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
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Returns an instance ofMetadata.Builder
which can be used to build new instances ofMetadata
instance which are full copies of thisMetadata
.long
created()
static MetaParamsInternalMetadata
empty()
boolean
long
findMetaParam
(Class<T> type) static Metadata
from
(MetaParams params) getBuilder
(MetaParamsInternalMetadata metadata) int
hashCode()
boolean
isEmpty()
boolean
isExpired
(long now) long
lastUsed()
long
lifespan()
Returns the lifespan of the cache entry with which this metadata object is associated, in milliseconds.long
maxIdle()
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()
boolean
Returns 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:
created
in interfaceInternalMetadata
-
lastUsed
@ProtoField(number=4, defaultValue="-1") public long lastUsed()- Specified by:
lastUsed
in interfaceInternalMetadata
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpired
in interfaceInternalMetadata
-
expiryTime
public long expiryTime()- Specified by:
expiryTime
in interfaceInternalMetadata
-
lifespan
@ProtoField(number=5, defaultValue="-1") public long lifespan()Description copied from interface:Metadata
Returns 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:Metadata
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. -
counterConfiguration
-
updateCreationTimestamp
@ProtoField(value=8, defaultValue="true") public boolean updateCreationTimestamp()Description copied from interface:Metadata
Returns 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 customMetadata
implementation.- Specified by:
updateCreationTimestamp
in interfaceMetadata
- Returns:
true
to update the creation timestamp when entries are modified.
-
version
Description copied from interface:Metadata
Returns the version of the cache entry with which this metadata object is associated. -
builder
Description copied from interface:Metadata
Returns an instance ofMetadata.Builder
which can be used to build new instances ofMetadata
instance which are full copies of thisMetadata
.- Specified by:
builder
in interfaceMetadata
- Returns:
- instance of
Metadata.Builder
-
findMetaParam
Description copied from interface:MetaParam.Lookup
Returns a non-emptyOptional
instance containing a metadata parameter instance that can be assigned to the typeClass
passed in, or an emptyOptional
if no metadata can be assigned to that type.- Specified by:
findMetaParam
in interfaceMetaParam.Lookup
- Type Parameters:
T
- metadata parameter type
-
isEmpty
public boolean isEmpty() -
toString
-
equals
-
hashCode
public int hashCode() -
getBuilder
-
empty
-