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 |
---|
ALREADY_HAS_LOCK
Flag to designate that this operation was performed on behalf of another that already has the lock for the given
key.
|
BACKUP_WRITE
Signals that a
WriteCommand was sent from the primary as a backup operation. |
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.
|
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.
|
IGNORE_RETURN_VALUES
Signals that a write operation's return value will be ignored, so reading
the existing value from a store or from a remote node is not necessary.
|
IGNORE_TRANSACTION
Flag that is used by keySet, entrySet and values methods so that they do not return transactional values.
|
IRAC_STATE
Signals a
WriteCommand as state transfer from remote site. |
IRAC_UPDATE
Signals a
WriteCommand as an update from a remote site (async). |
OPERATION_HOTROD
Deprecated.
Since 10.0, not in use.
|
OPERATION_MEMCACHED
Deprecated.
Since 10.0, not in use.
|
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.
|
PUT_FOR_X_SITE_STATE_TRANSFER
Flags the invocation as a put operation done internally by the cross-site state transfer.
|
REMOTE_ITERATION
Flag to identify that this iteration is done on a remote node and thus no additional wrappings are required
|
ROLLING_UPGRADE
Flag to identity that data is being written as part of a Rolling Upgrade.
|
SKIP_CACHE_LOAD
Skips loading an entry from any configured
CacheLoader s. |
SKIP_CACHE_STORE
Skips storing an entry to any configured
CacheLoader s. |
SKIP_INDEX_CLEANUP
Any time a new indexed entry is inserted, a delete statement is issued on the indexes
to remove previous values.
|
SKIP_INDEXING
Used by the Query module only, it will prevent the indexes to be updated as a result of the current operations.
|
SKIP_LISTENER_NOTIFICATION
This flag skips listener notifications as a result of a cache operation.
|
SKIP_LOCKING
Bypasses lock acquisition for this invocation altogether.
|
SKIP_OWNERSHIP_CHECK
Ignore current consistent hash and read from data container/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
Map.get(Object) or Map.containsKey(Object) ,
or to return the overwritten value for BasicCache.put(Object, Object) or BasicCache.remove(Object) . |
SKIP_SHARED_CACHE_STORE
If this flag is enabled, if a cache store is shared, then storage to the store is skipped.
|
SKIP_SIZE_OPTIMIZATION
Flag that can be used to skip any size optimizations - forcing iteration of entries to count.
|
SKIP_STATISTICS
This flag skips statistics updates as a result of a cache operation.
|
SKIP_XSITE_BACKUP
If cross-site replication is enabled, this would skip the replication to any remote site.
|
ZERO_LOCK_ACQUISITION_TIMEOUT
Overrides the
LockingConfiguration.lockAcquisitionTimeout(long) configuration setting by ensuring lock
managers use a 0-millisecond lock acquisition timeout. |
Modifier and Type | Method and Description |
---|---|
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
LockingConfiguration.lockAcquisitionTimeout(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 FORCE_ASYNCHRONOUS
public static final Flag FORCE_SYNCHRONOUS
public static final Flag SKIP_CACHE_STORE
CacheLoader
s.public static final Flag SKIP_CACHE_LOAD
CacheLoader
s.
Useful for example to perform a BasicCache.put(Object, Object)
operation while not interested
in the return value (i.e. the previous value of the key).
IGNORE_RETURN_VALUES
instead.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.
When using this flag with Optimistic caches, lock acquisition happen in the prepare phase at which point this flag will be ignored in order to ensure that Infinispan reports the correct exception back to the transaction manager. This is done for safety reasons to avoid inconsistent cache contents.
public static final Flag SKIP_REMOTE_LOOKUP
Map.get(Object)
or Map.containsKey(Object)
,
or to return the overwritten value for BasicCache.put(Object, Object)
or BasicCache.remove(Object)
.
This would render return values for most operations unusable, in exchange for the performance gains of
reducing remote calls.
IGNORE_RETURN_VALUES
instead.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 PUT_FOR_X_SITE_STATE_TRANSFER
public static final Flag SKIP_SHARED_CACHE_STORE
public static final Flag SKIP_OWNERSHIP_CHECK
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.
This flag is ignored for operations that need the existing value to execute
correctly, e.g. Map.get(Object)
,
conditional remove (ConcurrentMap.remove(Object, Object)
),
and replace with an expected value (ConcurrentMap.replace(Object, Object, Object)
).
That means it is safe to use IGNORE_RETURN_VALUES
for all the operations on a cache,
unlike SKIP_REMOTE_LOOKUP
and SKIP_CACHE_LOAD
.public static final Flag SKIP_XSITE_BACKUP
public static final Flag SKIP_LISTENER_NOTIFICATION
Map.get(Object)
call, no callbacks will be made on listeners annotated with
CacheEntryVisited
.public static final Flag SKIP_STATISTICS
Map.get(Object)
call, no cache hits or cache miss counters will be updated.@Deprecated public static final Flag OPERATION_HOTROD
@Deprecated public static final Flag OPERATION_MEMCACHED
public static final Flag SKIP_INDEX_CLEANUP
public static final Flag COMMAND_RETRY
public static final Flag ROLLING_UPGRADE
public static final Flag REMOTE_ITERATION
public static final Flag SKIP_SIZE_OPTIMIZATION
public static final Flag IGNORE_TRANSACTION
public static final Flag IRAC_UPDATE
WriteCommand
as an update from a remote site (async).
Internal use
public static final Flag IRAC_STATE
WriteCommand
as state transfer from remote site.
Internal use
public static final Flag ALREADY_HAS_LOCK
public static final Flag BACKUP_WRITE
WriteCommand
was sent from the primary as a backup operation.
Some things do not need to be checked in this case.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 nullCopyright © 2021 JBoss by Red Hat. All rights reserved.