|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.config.Option
public class Option
Used to override characteristics of specific calls to the cache. The javadocs of each of the setters below detail functionality and behaviour.
Constructor Summary | |
---|---|
Option()
|
Method Summary | |||
---|---|---|---|
Option |
clone()
|
||
boolean |
equals(Object o)
|
||
DataVersion |
getDataVersion()
|
||
boolean |
getForceDataGravitation()
|
||
int |
getGroupRequestMode()
|
||
int |
getLockAcquisitionTimeout()
Gets any lock acquisition timeout configured for the call. |
||
long |
getSyncReplTimeout()
|
||
int |
hashCode()
|
||
boolean |
isCacheModeLocal()
only applies to put() and remove() methods on the cache. |
||
boolean |
isFailSilently()
|
||
boolean |
isForceAsynchronous()
Gets whether replication or invalidation should be done asynchronously, even if the cache is configured in a synchronous mode. |
||
boolean |
isForceSynchronous()
Gets whether replication or invalidation should be done synchronously, even if the cache is configured in an asynchronous mode. |
||
boolean |
isForceWriteLock()
Tests whether a write lock has been forced on the call, regardless of whether it is a read or write. |
||
boolean |
isSkipCacheStatusCheck()
|
||
boolean |
isSkipDataGravitation()
|
||
boolean |
isSuppressLocking()
|
||
void |
reset()
Resets this option to defaults. |
||
void |
setCacheModeLocal(boolean cacheModeLocal)
overriding CacheMode from REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC, INVALIDATION_ASYNC to LOCAL. |
||
void |
setDataVersion(DataVersion dataVersion)
Passing in an DataVersion instance when using optimistic locking will override the default behaviour of internally generated version info and allow the caller to handle data versioning. |
||
void |
setFailSilently(boolean failSilently)
suppress any failures in your cache operation, including version mismatches with optimistic locking, timeouts obtaining locks, transaction rollbacks. |
||
void |
setForceAsynchronous(boolean forceAsynchronous)
Sets whether replication or invalidation should be done asynchronously, even if the cache is configured in a synchronous mode. |
||
void |
setForceDataGravitation(boolean enableDataGravitation)
Enables data gravitation calls if a cache miss is detected when using |
void |
setForceSynchronous(boolean forceSynchronous)
Sets whether replication or invalidation should be done synchronously, even if the cache is configured in an asynchronous mode. |
void |
setForceWriteLock(boolean forceWriteLock)
Forces a write lock to be acquired on the call, regardless of whether it is a read or write. |
||
void |
setGroupRequestMode(int groupRequestMode)
By default, the RPCManager has inbuilt logic when it comes to selecting a group request mode. |
||
void |
setLockAcquisitionTimeout(int lockAcquisitionTimeout)
Sets any lock acquisition timeout configured for the call. |
||
void |
setSkipCacheStatusCheck(boolean skipCacheStatusCheck)
If set to true, cache lifecycle checks will be skipped. |
||
void |
setSkipDataGravitation(boolean skipDataGravitation)
Suppresses data gravitation when buddy replication is used. |
||
void |
setSuppressLocking(boolean suppressLocking)
Suppresses acquiring locks for the given invocation. |
||
void |
setSyncReplTimeout(long syncReplTimeout)
Used to override the value in Configuration.getSyncReplTimeout() (used when cache mode is either Configuration.CacheMode.REPL_SYNC
or Configuration.CacheMode.INVALIDATION_SYNC ) for this specific invocation. |
||
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Option()
Method Detail |
---|
public boolean isSuppressLocking()
public void setSuppressLocking(boolean suppressLocking)
public boolean isFailSilently()
public void setFailSilently(boolean failSilently)
public boolean isCacheModeLocal()
public void setCacheModeLocal(boolean cacheModeLocal)
cacheModeLocal
- public DataVersion getDataVersion()
public void setDataVersion(DataVersion dataVersion)
DataVersion
instance when using optimistic locking will override the default behaviour of internally generated version info and allow the caller to handle data versioning.
public boolean getForceDataGravitation()
public void setForceDataGravitation(boolean enableDataGravitation)
autoDataGravitation
is set to false
.
See Buddy Replication documentation for more details.
public boolean isSkipDataGravitation()
public void setSkipDataGravitation(boolean skipDataGravitation)
setForceDataGravitation(boolean)
being set to true. Typically used to suppress gravitation calls when BuddyReplicationConfig.setAutoDataGravitation(boolean)
is set to true.
skipDataGravitation
- public boolean isForceAsynchronous()
true
if replication/invalidation should be done
asynchronously; false
if the default mode
configured for the cache should be used.public void setForceAsynchronous(boolean forceAsynchronous)
forceAsynchronous
- true
if replication/invalidation
should be done asynchronously; false
if the default mode configured for the cache
should be used.public boolean isForceSynchronous()
true
if replication/invalidation should be done
synchronously; false
if the default mode
configured for the cache should be used.public void setForceSynchronous(boolean forceSynchronous)
forceSynchronous
- true
if replication/invalidation
should be done synchronously; false
if the default mode configured for the cache
should be used.public int getLockAcquisitionTimeout()
public void setLockAcquisitionTimeout(int lockAcquisitionTimeout)
lockAcquisitionTimeout
- the time in ms that lock acquisition
attempts should block before failing with a
TimeoutException. A value < 0 indicates
that the cache's default timeout should be used.public String toString()
toString
in class Object
public Option clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void reset()
public void setForceWriteLock(boolean forceWriteLock)
PessimisticLockInterceptor
forceWriteLock
- public boolean isForceWriteLock()
PessimisticLockInterceptor
public void setSkipCacheStatusCheck(boolean skipCacheStatusCheck)
public boolean isSkipCacheStatusCheck()
public long getSyncReplTimeout()
Configuration.CacheMode.REPL_SYNC
or Configuration.CacheMode.INVALIDATION_SYNC
) to be used for this specific call, or -1 (default) if the
default value in Configuration.getSyncReplTimeout()
is to be used instead.public void setSyncReplTimeout(long syncReplTimeout)
Configuration.getSyncReplTimeout()
(used when cache mode is either Configuration.CacheMode.REPL_SYNC
or Configuration.CacheMode.INVALIDATION_SYNC
) for this specific invocation. Defaults to -1,
which means use the default in the configuration.
syncReplTimeout
- new timeout value for this invocation.public int getGroupRequestMode()
GroupRequest
mode to use, or -1 if the RPCManager
's
own logic is to be used to select a group request mode (this is the default).public void setGroupRequestMode(int groupRequestMode)
RPCManager
has inbuilt logic when it comes to selecting a group request mode.
This can be overridden by setting the group request mode here, using this method, for a specific invocation.
groupRequestMode
- a group request mode, found in the GroupRequest
class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |