public static enum NonBlockingStore.Characteristic extends Enum<NonBlockingStore.Characteristic>
Enum Constant and Description |
---|
BULK_READ
If this store supports bulk read operations.
|
EXPIRATION
If this store uses expiration metadata so that it never returns expired entries
via any methods such as
NonBlockingStore.load(int, Object) , NonBlockingStore.publishKeys(IntSet, Predicate) or
NonBlockingStore.publishEntries(IntSet, Predicate, boolean) . |
READ_ONLY
If this store supports only being read from.
|
SEGMENTABLE
If this store supports segmentation.
|
SHAREABLE
If this store can be shared across multiple Infinispan nodes; for example, an external system such as
a database.
|
TRANSACTIONAL
If this store supports being invoked in a transactional context with prepare and commit or rollback phases.
|
WRITE_ONLY
If this store supports only being written to.
|
Modifier and Type | Method and Description |
---|---|
static NonBlockingStore.Characteristic |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NonBlockingStore.Characteristic[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NonBlockingStore.Characteristic SHAREABLE
public static final NonBlockingStore.Characteristic READ_ONLY
NonBlockingStore.write(int, MarshallableEntry)
,
NonBlockingStore.delete(int, Object)
, and NonBlockingStore.batch(int, Publisher, Publisher)
methods
are not invoked on stores with this characteristic.public static final NonBlockingStore.Characteristic WRITE_ONLY
NonBlockingStore.load(int, Object)
and
NonBlockingStore.containsKey(int, Object)
methods are not invoked on stores with this characteristic.public static final NonBlockingStore.Characteristic BULK_READ
Cache.size()
and Cache.entrySet().stream()
do not use this store.
Stores that have this characteristic must override the NonBlockingStore.publishKeys(IntSet, Predicate)
,
NonBlockingStore.publishEntries(IntSet, Predicate, boolean)
and NonBlockingStore.size(IntSet)
methods.
This characteristic is ignored if the store also contains WRITE_ONLY
.
public static final NonBlockingStore.Characteristic TRANSACTIONAL
Stores that have this characteristic must override the
NonBlockingStore.prepareWithModifications(Transaction, int, Publisher, Publisher)
, NonBlockingStore.commit(Transaction)
and
NonBlockingStore.rollback(Transaction)
methods.
This characteristic is ignored if the store also contains READ_ONLY
.
public static final NonBlockingStore.Characteristic SEGMENTABLE
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)
and
NonBlockingStore.removeSegments(IntSet)
methods. However, if a store is SHAREABLE
and is configured to be shared
via configuration these methods are not invoked.
public static final NonBlockingStore.Characteristic EXPIRATION
NonBlockingStore.load(int, Object)
, NonBlockingStore.publishKeys(IntSet, Predicate)
or
NonBlockingStore.publishEntries(IntSet, Predicate, boolean)
. Stores should use the provided
TimeService
in the InitializationContext
to determine if entries are
expired.
The information about an entry and its expiration is included in the Metadata
,
accessible from the MarshallableEntry
that is provided.
Stores that have this characteristic must override the NonBlockingStore.purgeExpired()
method.
public static NonBlockingStore.Characteristic[] values()
for (NonBlockingStore.Characteristic c : NonBlockingStore.Characteristic.values()) System.out.println(c);
public static NonBlockingStore.Characteristic 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.