|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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()
Deprecated. this method may disappear in future, please use copy() instead. |
Option |
copy()
|
boolean |
equals(Object o)
|
DataVersion |
getDataVersion()
Deprecated. this is to support a deprecated locking scheme (Optimistic Locking). Will be removed when Optimistic Locking support is removed. |
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 |
isSuppressEventNotification()
Get whether event notifications for this invocation will be suppresed. |
boolean |
isSuppressLocking()
|
boolean |
isSuppressPersistence()
If set to true, any persistence to a cache loader will be suppressed for the current invocation only. |
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)
Deprecated. this is to support a deprecated locking scheme (Optimistic Locking). Will be removed when Optimistic Locking support is removed. |
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 Buddy Replication. |
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 |
setSuppressEventNotification(boolean suppressEventNotification)
Set whether event notifications should be suppressed for this particular cache or transaction invocation. |
void |
setSuppressLocking(boolean suppressLocking)
Suppresses acquiring locks for the given invocation. |
void |
setSuppressPersistence(boolean suppressPersistence)
If set to true, any persistence to a cache loader will be suppressed for the current invocation only. |
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
- @Deprecated public DataVersion getDataVersion()
@Deprecated 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
@Deprecated public Option clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
copy()
public Option copy()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void reset()
public void setForceWriteLock(boolean forceWriteLock)
Configuration.NodeLockingScheme.MVCC
and Configuration.NodeLockingScheme.PESSIMISTIC
node locking schemes, and is ignored if Configuration.NodeLockingScheme.OPTIMISTIC
is used.
forceWriteLock
- public boolean isForceWriteLock()
Configuration.NodeLockingScheme.MVCC
and Configuration.NodeLockingScheme.PESSIMISTIC
node locking schemes, and is ignored if Configuration.NodeLockingScheme.OPTIMISTIC
is used.
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.public boolean isSuppressPersistence()
public void setSuppressPersistence(boolean suppressPersistence)
suppressPersistence
- if true, will suppress persistence.public boolean isSuppressEventNotification()
public void setSuppressEventNotification(boolean suppressEventNotification)
suppressEventNotification
- true
if event notification
should be skipped; false
if events
should be notified if there're any listeners.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |