Interface MetaParam<T>
-
- Type Parameters:
T- type of MetaParam instance, implementations should assign it to the implementation's type.
- All Known Subinterfaces:
MetaParam.Writable<T>
- All Known Implementing Classes:
MetaParam.MetaBoolean,MetaParam.MetaCreated,MetaParam.MetaEntryVersion,MetaParam.MetaLastUsed,MetaParam.MetaLifespan,MetaParam.MetaLoadedFromPersistence,MetaParam.MetaLong,MetaParam.MetaMaxIdle,MetaParam.MetaUpdateCreationTime
@Experimental public interface MetaParam<T>
An easily extensible metadata parameter that's stored along with the value in the the functional map.Some metadata parameters can be provided by the user in which case they need to implement
MetaParam.Writable. Examples of writable metadata parameters are version information, lifespan of the cached value...etc.Those metadata parameters not extending
MetaParam.Writableare created by internal logic and hence can only be queried, for example: time when value was added into the functional map, or last time value was accessed or modified.What makes
MetaParamdifferent fromParamis thatMetaParamvalues are designed to be stored along with key/value pairs in the functional map, to provide extra information. On the other hand,Paraminstances merely act as ways to tweak how operations are executed, and their contents are never stored permanently.This interface replaces Infinispan's Metadata interface providing a more flexible way to add new metadata parameters to be stored with the cached entries.
MetaParamdesign has been geared towards making a clear separation between the metadata that can be provided by the user on per-entry basis, e.g. lifespan, maxIdle, version...etc, as opposed to metadata that's produced by the internal logic that cannot be modified directly by the user, e.g. cache entry created time, last time cache entry was modified or accessed ...etc.- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMetaParam.LookupProvides metadata parameter lookup capabilities usingClassas lookup key.static classMetaParam.MetaBooleanstatic classMetaParam.MetaCreatedRead only metadata parameter representing a cached entry's created time in milliseconds.static classMetaParam.MetaEntryVersionWritable metadata parameter representing a cached entry's generic version.static classMetaParam.MetaLastUsedRead only metadata parameter representing a cached entry's last used time in milliseconds.static classMetaParam.MetaLifespanWritable metadata parameter representing a cached entry's millisecond lifespan.static classMetaParam.MetaLoadedFromPersistenceNon-writable parameter telling if the entry was loaded from a persistence tier (CacheLoader) or not.static classMetaParam.MetaLongAbstract class for numeric long-based metadata parameter instances.static classMetaParam.MetaMaxIdleWritable metadata parameter representing a cached entry's millisecond max idle time.static classMetaParam.MetaUpdateCreationTimeA parameter to tell if the creation timestamp should be updated for modified entries.static interfaceMetaParam.Writable<T>WritableMetaParaminstances are those that the user can provide to be stored as part of the cache entry.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Returns the value of the meta parameter.
-
-
-
Method Detail
-
get
T get()
Returns the value of the meta parameter.
-
-