Interface Param<P>
-
- Type Parameters:
P- type of parameter
- All Known Implementing Classes:
Param.ExecutionMode,Param.LockingMode,Param.PersistenceMode,Param.ReplicationMode,Param.StatisticsMode
public interface Param<P>An easily extensible parameter that allows functional map operations to be tweaked. Examples would include local-only parameter, skip-cache-store parameter and others.What makes
Paramdifferent fromMetaParamis thatParamvalues are never stored in the functional map. They merely act as ways to tweak how operations are executed.Since
Paraminstances control how the internals work, onlyParamimplementations by Infinispan will be supported.This interface is equivalent to Infinispan's Flag, but it's more powerful because it allows to pass a flag along with a value. Infinispan's Flag are enum based which means no values can be passed along with value.
Since each param is an independent entity, it's easy to create public versus private parameter distinction. When parameters are stored in enums, it's more difficult to make such distinction.
- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classParam.ExecutionModeDefines where is the command executed.static classParam.LockingModeNormally the cache has to acquire locks during any write operation to guarantee its correctness.static classParam.PersistenceModeWhen a persistence store is attached to a cache, by default all write operations, regardless of whether they are inserts, updates or removes, are persisted to the store.static classParam.ReplicationModestatic classParam.StatisticsModeDefines how statistics are gathered for this command.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Pget()Parameter's value.intid()A parameter's identifier.
-
-
-
Method Detail
-
id
int id()
A parameter's identifier. Each parameter must have a different id.A numeric id makes it flexible enough to be stored in collections that take up low resources, such as arrays.
-
get
P get()
Parameter's value.
-
-