Enum Class NonBlockingStore.Characteristic
- All Implemented Interfaces:
Serializable
,Comparable<NonBlockingStore.Characteristic>
,Constable
- Enclosing interface:
NonBlockingStore<K,
V>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIf this store supports bulk read operations.If this store uses expiration metadata so that it never returns expired entries via any methods such asNonBlockingStore.load(int, Object)
,NonBlockingStore.publishKeys(IntSet, Predicate)
orNonBlockingStore.publishEntries(IntSet, Predicate, boolean)
.If this store supports only being read from.If this store supports segmentation.If this store can be shared across multiple Infinispan nodes; for example, an external system such as a database.If this store supports being invoked in a transactional context with prepare and commit or rollback phases.If this store supports only being written to. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static NonBlockingStore.Characteristic[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHAREABLE
If this store can be shared across multiple Infinispan nodes; for example, an external system such as a database. This characteristic allows validation of the store configuration. -
READ_ONLY
If this store supports only being read from. Write-based operations are never invoked on this store. No optional methods map to this characteristic. TheNonBlockingStore.write(int, MarshallableEntry)
,NonBlockingStore.delete(int, Object)
, andNonBlockingStore.batch(int, Publisher, Publisher)
methods are not invoked on stores with this characteristic. -
WRITE_ONLY
If this store supports only being written to. Read-based operations are never invoked on this store. No optional methods map to this characteristic. TheNonBlockingStore.load(int, Object)
andNonBlockingStore.containsKey(int, Object)
methods are not invoked on stores with this characteristic. -
BULK_READ
If this store supports bulk read operations. If a store does not have this characteristic, operations such asCache.size()
andCache.entrySet().stream()
do not use this store.Stores that have this characteristic must override the
NonBlockingStore.publishKeys(IntSet, Predicate)
,NonBlockingStore.publishEntries(IntSet, Predicate, boolean)
andNonBlockingStore.size(IntSet)
methods.This characteristic is ignored if the store also contains
WRITE_ONLY
. -
TRANSACTIONAL
If this store supports being invoked in a transactional context with prepare and commit or rollback phases. Stores of this type can participate in the actual transaction, if present.Stores that have this characteristic must override the
NonBlockingStore.prepareWithModifications(Transaction, int, Publisher, Publisher)
,NonBlockingStore.commit(Transaction)
andNonBlockingStore.rollback(Transaction)
methods.This characteristic is ignored if the store also contains
READ_ONLY
. -
SEGMENTABLE
If this store supports segmentation. All methods in this SPI take as an argument a way to map a given entry to a segment. A segment in Infinispan is an int that acts as a bucket for many keys. Many store implementations may be able to store and load entries in a more performant way if they segment their data accordingly.If this store is not segmentable then invokers of this SPI are not required to calculate these segments before invoking these methods and thus these methods may be invoked with any int value, null or equivalent. Refer to each method to determine their effect when this store is not segmented.
Note that you can also configure stores at runtime to be segmented or not. If the runtime configuration of this store is non-segmented, it is equivalent to the store not having the SEGMENTABLE characteristic, which might cause parameters to be null or invalid segment numbers. Store implementation can block this configuration by throwing an exception in the
NonBlockingStore.start(InitializationContext)
method.While it is possible that a SEGMENTABLE store can be configured as non-segmented, a store that is not SEGMENTABLE can never then later be configured as segmented.
Stores that have this characteristic must override the
NonBlockingStore.addSegments(IntSet)
andNonBlockingStore.removeSegments(IntSet)
methods. However, if a store isSHAREABLE
and is configured to be shared via configuration these methods are not invoked. -
EXPIRATION
If this store uses expiration metadata so that it never returns expired entries via any methods such asNonBlockingStore.load(int, Object)
,NonBlockingStore.publishKeys(IntSet, Predicate)
orNonBlockingStore.publishEntries(IntSet, Predicate, boolean)
. Stores should use the providedTimeService
in theInitializationContext
to determine if entries are expired.The information about an entry and its expiration is included in the
Metadata
, accessible from theMarshallableEntry
that is provided.Stores that have this characteristic must override the
NonBlockingStore.purgeExpired()
method.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-