Package org.infinispan.functional.impl
Class MetaParamsInternalMetadata
- java.lang.Object
-
- org.infinispan.functional.impl.MetaParamsInternalMetadata
-
- All Implemented Interfaces:
MetaParam.Lookup
,InternalMetadata
,Metadata
public final class MetaParamsInternalMetadata extends Object implements InternalMetadata, MetaParam.Lookup
Metadata parameters backed internal metadata representation.- Since:
- 8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetaParamsInternalMetadata.Builder
static class
MetaParamsInternalMetadata.Externalizer
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetaParamsInternalMetadata.Builder
builder()
Returns an instance ofMetadata.Builder
which can be used to build new instances ofMetadata
instance which are full copies of thisMetadata
.long
created()
long
expiryTime()
<T extends MetaParam>
Optional<T>findMetaParam(Class<T> type)
static Metadata
from(org.infinispan.functional.impl.MetaParams params)
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.String
toString()
EntryVersion
version()
Returns the version of the cache entry with which this metadata object is associated.
-
-
-
Method Detail
-
from
public static Metadata from(org.infinispan.functional.impl.MetaParams params)
-
created
public long created()
- Specified by:
created
in interfaceInternalMetadata
-
lastUsed
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
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
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.
-
version
public EntryVersion version()
Description copied from interface:Metadata
Returns the version of the cache entry with which this metadata object is associated.
-
builder
public MetaParamsInternalMetadata.Builder 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
public <T extends MetaParam> Optional<T> findMetaParam(Class<T> type)
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
-
-