public enum Flag extends Enum<Flag>
AdvancedCache
interface, using some of the
overloaded methods that allow passing in of a variable number of Flags.
When making modifications to these enum, do not change the order of
enumerations, so always append any new enumerations after the last one.
Finally, enumerations should not be removed.Modifier and Type | Class and Description |
---|---|
static class |
Flag.Externalizer |
Enum Constant and Description |
---|
CACHE_MODE_LOCAL
Forces LOCAL mode operation, even if the cache is configured to use a clustered mode like replication,
invalidation or distribution.
|
COMMAND_RETRY
If a write operation encounters a retry due to a topology change this flag should be used to tell the new owner
that such a thing happened.
|
DELTA_WRITE
Signals when a particular cache write operation is writing a delta of
the object, rather than the full object.
|
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.
|
GUARANTEED_DELIVERY
Using a synchronous cache (whether replicated or distributed) provides
the cache caller guarantees that data has been sent to other cluster
nodes correctly and has been applied successfully.
|
IGNORE_RETURN_VALUES
Signals that an operation's return value will be ignored.
|
PUT_FOR_EXTERNAL_READ
Flags the invocation as a
Cache.putForExternalRead(Object, Object)
call, as opposed to a regular BasicCache.put(Object, Object) . |
PUT_FOR_STATE_TRANSFER
Flags the invocation as a put operation done internally by the state transfer.
|
REMOVE_DATA_ON_STOP
Deprecated.
No longer in use.
|
SKIP_CACHE_LOAD
Skips loading an entry from any configured
CacheStore s. |
SKIP_CACHE_STATUS_CHECK
Deprecated.
This flag is no longer in use.
|
SKIP_CACHE_STORE
Skips storing an entry to any configured
CacheStore s. |
SKIP_INDEXING
Used by the Query module only, it will prevent the indexes to be updated as a result of the current operations.
|
SKIP_LOCKING
Bypasses lock acquisition for this invocation altogether.
|
SKIP_OWNERSHIP_CHECK
Used by the DistLockingInterceptor to commit the change no matter what (if the flag is set).
|
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().
|
SKIP_SHARED_CACHE_STORE
If this flag is enabled, if a cache store is shared, then storage to the store is skipped.
|
SKIP_XSITE_BACKUP
If cross-site replication is enabled, this would skip the replication to any remote site.
|
ZERO_LOCK_ACQUISITION_TIMEOUT
Overrides the
Configuration.setLockAcquisitionTimeout(long) configuration setting by ensuring lock
managers use a 0-millisecond lock acquisition timeout. |
Modifier and Type | Method and Description |
---|---|
static Set<Flag> |
copyWithoutRemotableFlags(Set<Flag> flags)
Creates a copy of a Flag Set removing instances of FAIL_SILENTLY.
|
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.
|
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
@Deprecated 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 SKIP_CACHE_LOAD
CacheStore
s. Useful for example to perform a put() operation
while not interested in the return value of put() which would return the eventually existing previous value.
SKIP_REMOTE_LOOKUP
flag.public static final Flag 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.
This Flag will not be replicated to remote nodes, but it will still protect the invoker from remote exceptions.
public static final Flag SKIP_REMOTE_LOOKUP
BasicCache.put(Object, Object)
or BasicCache.remove(Object)
unusable, in
exchange for the performance gains of reducing remote calls.
SKIP_CACHE_LOAD
flag.public static final Flag SKIP_INDEXING
public static final Flag PUT_FOR_EXTERNAL_READ
Cache.putForExternalRead(Object, Object)
call, as opposed to a regular BasicCache.put(Object, Object)
. This
flag was created purely for internal Infinispan usage, and should not be
used by clients calling into Infinispan.public static final Flag PUT_FOR_STATE_TRANSFER
public static final Flag SKIP_SHARED_CACHE_STORE
@Deprecated public static final Flag REMOVE_DATA_ON_STOP
Lifecycle.stop()
and its effect is that apart from stopping
the cache, it removes all of its content from both memory and any backing
cache store.public static final Flag SKIP_OWNERSHIP_CHECK
public static final Flag DELTA_WRITE
public static final Flag IGNORE_RETURN_VALUES
Map.put(Object, Object)
whose return value indicates
previous value. So, a user might decide to the put something in the
cache but might not be interested in the return value.
Not requiring return values makes the cache behave more efficiently by
applying flags such as SKIP_REMOTE_LOOKUP
or
SKIP_CACHE_LOAD
.public static final Flag SKIP_XSITE_BACKUP
public static final Flag GUARANTEED_DELIVERY
GUARANTEED_DELIVERY
flag.
Note that this is flag is EXPERIMENTAL and so there is a high
probability that it will be removed in future Infinispan versions.public static final Flag COMMAND_RETRY
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 nameNullPointerException
- if the argument is nullpublic static Set<Flag> copyWithoutRemotableFlags(Set<Flag> flags)
flags
- Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.