|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Flag>
org.infinispan.context.Flag
public enum Flag
Available flags, which may be set on a per-invocation basis. These are provided using the AdvancedCache
interface, using some of the overloaded methods that allow passing in of a variable number of Flags.
ZERO_LOCK_ACQUISITION_TIMEOUT
- overrides the Configuration.setLockAcquisitionTimeout(long)
configuration setting by ensuring lock managers use a 0-millisecond
lock acquisition timeout. Useful if you only want to acquire a lock
on an entry if and only if the lock is uncontended.CACHE_MODE_LOCAL
- forces LOCAL mode opersation, even if the cache is configured to use a clustered
mode like replication, invalidation or distribution. Applying this flag will
suppress any RPC messages otherwise associated with this invocation.SKIP_LOCKING
- bypasses lock acquisition for this invocation altogether. A potentially dangerous
flag, as it can lead to inconsistent data.FORCE_WRITE_LOCK
- forces a write lock, even if the invocation is a read operation. Useful when
reading an entry to later update it within the same transaction, and is analogous
in behavior and use case to a select ... for update ... SQL statement.SKIP_CACHE_STATUS_CHECK
- skips checking whether a cache is in a receptive state, i.e. is
ComponentStatus.RUNNING
. May break operation in weird ways!FORCE_ASYNCHRONOUS
- forces asynchronous network calls where possible, even if otherwise configured
to use synchronous network calls. Only applicable to non-local, clustered caches.FORCE_SYNCHRONOUS
- forces synchronous network calls where possible, even if otherwise configured
to use asynchronous network calls. Only applicable to non-local, clustered caches.SKIP_CACHE_STORE
- skips storing an entry to any configured CacheStore
s.FAIL_SILENTLY
- swallows any exceptions, logging them instead at a low log level. Will prevent a
failing operation from affecting any ongoing JTA transactions as well.SKIP_REMOTE_LOOKUP
- when used with distributed cache mode, will prevent retrieving a remote
value either when executing a get() or exists(), or to provide an overwritten
return value for a put() or remove(). This would render return values for some
operations (such as Map.put(Object, Object)
or Map.remove(Object)
unusable, in exchange for the performance gains of reducing remote calls.PUT_FOR_EXTERNAL_READ
- flags the invocation as a Cache.putForExternalRead(Object, Object)
call, as opposed to a regular Map.put(Object, Object)
.
Enum Constant Summary | |
---|---|
CACHE_MODE_LOCAL
Forces LOCAL mode opersation, even if the cache is configured to use a clustered mode like replication, invalidation or distribution. |
|
FAIL_SILENTLY
Swallows any exceptions, logging them instead at a low log level. |
|
FORCE_ASYNCHRONOUS
Forces asynchronous network calls where possible, even if otherwise configured to use synchronous network calls. |
|
FORCE_SYNCHRONOUS
Forces synchronous network calls where possible, even if otherwise configured to use asynchronous network calls. |
|
FORCE_WRITE_LOCK
Forces a write lock, even if the invocation is a read operation. |
|
PUT_FOR_EXTERNAL_READ
Flags the invocation as a Cache.putForExternalRead(Object, Object) call, as opposed to a regular
Map.put(Object, Object) . |
|
SKIP_CACHE_STATUS_CHECK
Skips checking whether a cache is in a receptive state, i.e. |
|
SKIP_CACHE_STORE
Skips storing an entry to any configured CacheStore s. |
|
SKIP_LOCKING
Bypasses lock acquisition for this invocation altogether. |
|
SKIP_REMOTE_LOOKUP
When used with distributed cache mode, will prevent retrieving a remote value either when executing a get() or exists(), or to provide an overwritten return value for a put() or remove(). |
|
ZERO_LOCK_ACQUISITION_TIMEOUT
Overrides the Configuration.setLockAcquisitionTimeout(long) configuration setting by ensuring lock
managers use a 0-millisecond lock acquisition timeout. |
Method Summary | |
---|---|
static Flag |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Flag[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Flag ZERO_LOCK_ACQUISITION_TIMEOUT
Configuration.setLockAcquisitionTimeout(long)
configuration setting by ensuring lock
managers use a 0-millisecond lock acquisition timeout. Useful if you only want to acquire a lock on an entry
if and only if the lock is uncontended.
public static final Flag CACHE_MODE_LOCAL
public static final Flag SKIP_LOCKING
public static final Flag FORCE_WRITE_LOCK
public static final Flag SKIP_CACHE_STATUS_CHECK
ComponentStatus.RUNNING
. May break
operation in weird ways!
public static final Flag FORCE_ASYNCHRONOUS
public static final Flag FORCE_SYNCHRONOUS
public static final Flag SKIP_CACHE_STORE
CacheStore
s.
public static final Flag FAIL_SILENTLY
public static final Flag SKIP_REMOTE_LOOKUP
Map.put(Object, Object)
or Map.remove(Object)
unusable, in
exchange for the performance gains of reducing remote calls.
public static final Flag PUT_FOR_EXTERNAL_READ
Cache.putForExternalRead(Object, Object)
call, as opposed to a regular
Map.put(Object, Object)
.
Method Detail |
---|
public static Flag[] values()
for (Flag c : Flag.values()) System.out.println(c);
public static Flag valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
|
Google Analytics | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |