True. And if they are passed in explicitly via varargs, we get over all of the thread
local issues.
Not too sure about a separate option subclass for each option though - might be a bit
heavy.
Perhaps options could be an enum, given that each option is just a boolean switch (with
the exception of lockAcquisitionTimeout and syncReplTimeout, that is). As for
lockAcquisitionTimeout and syncReplTimeout, AFAIK lockAcquisitionTimeout is only used to
zero the acquisition timeout for putForExternalRead(), so it could be replaced with a
boolean zeroLockAcquisutionTimeout.
I don't see where syncReplTimeout is used, maybe it is unnecessary?
So, Options may now look like:
| public enum Options {
| FAIL_SILENTLY, CACHE_MODE_LOCAL, SUPPRESS_LOCKING, FORCE_WRITE_LOCK,
| SKIP_CACHE_STATUS_CHECK, FORCE_ASYNC, FORCE_SYNC,
| // ... etc ...
| }
|
And the CacheInvocationDelegate creates an EnumSet from these and adds this EnumSet to the
invocation context before passing up the chain.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205817#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...