Package org.infinispan.functional.impl
Class MetaParamsInternalMetadata
java.lang.Object
org.infinispan.functional.impl.MetaParamsInternalMetadata
- All Implemented Interfaces:
MetaParam.Lookup,InternalMetadata,Metadata
@Experimental
@ProtoTypeId(1003)
public final class MetaParamsInternalMetadata
extends Object
implements InternalMetadata, MetaParam.Lookup
Metadata parameters backed internal metadata representation.
- Since:
- 8.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns an instance ofMetadata.Builderwhich can be used to build new instances ofMetadatainstance which are full copies of thisMetadata.longcreated()static MetaParamsInternalMetadataempty()booleanlongfindMetaParam(Class<T> type) static Metadatafrom(MetaParams params) getBuilder(MetaParamsInternalMetadata metadata) inthashCode()booleanisEmpty()booleanisExpired(long now) longlastUsed()longlifespan()Returns the lifespan of the cache entry with which this metadata object is associated, in milliseconds.longmaxIdle()Returns the the maximum amount of time that the cache entry associated with this metadata object is allowed to be idle for before it is considered as expired, in milliseconds.toString()booleanReturns if the creation timestamp is updated when an entry is modified.version()Returns the version of the cache entry with which this metadata object is associated.
-
Method Details
-
from
-
created
@ProtoField(number=3, defaultValue="-1") public long created()- Specified by:
createdin interfaceInternalMetadata
-
lastUsed
@ProtoField(number=4, defaultValue="-1") public long lastUsed()- Specified by:
lastUsedin interfaceInternalMetadata
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpiredin interfaceInternalMetadata
-
expiryTime
public long expiryTime()- Specified by:
expiryTimein interfaceInternalMetadata
-
lifespan
@ProtoField(number=5, defaultValue="-1") public long lifespan()Description copied from interface:MetadataReturns the lifespan of the cache entry with which this metadata object is associated, in milliseconds. Negative values are interpreted as unlimited lifespan. -
maxIdle
@ProtoField(number=6, defaultValue="-1") public long maxIdle()Description copied from interface:MetadataReturns the the maximum amount of time that the cache entry associated with this metadata object is allowed to be idle for before it is considered as expired, in milliseconds. -
counterConfiguration
-
updateCreationTimestamp
@ProtoField(value=8, defaultValue="true") public boolean updateCreationTimestamp()Description copied from interface:MetadataReturns if the creation timestamp is updated when an entry is modified.Created entries always update the creation timestamp.
This capability is experimental and all Infinispan implementations return
true. To update creation timestamps you must create a customMetadataimplementation.- Specified by:
updateCreationTimestampin interfaceMetadata- Returns:
trueto update the creation timestamp when entries are modified.
-
version
Description copied from interface:MetadataReturns the version of the cache entry with which this metadata object is associated. -
builder
Description copied from interface:MetadataReturns an instance ofMetadata.Builderwhich can be used to build new instances ofMetadatainstance which are full copies of thisMetadata.- Specified by:
builderin interfaceMetadata- Returns:
- instance of
Metadata.Builder
-
findMetaParam
Description copied from interface:MetaParam.LookupReturns a non-emptyOptionalinstance containing a metadata parameter instance that can be assigned to the typeClasspassed in, or an emptyOptionalif no metadata can be assigned to that type.- Specified by:
findMetaParamin interfaceMetaParam.Lookup- Type Parameters:
T- metadata parameter type
-
isEmpty
public boolean isEmpty() -
toString
-
equals
-
hashCode
public int hashCode() -
getBuilder
-
empty
-