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 Modifier and Type Class Description static classMetaParamsInternalMetadata.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetaParamsInternalMetadata.Builderbuilder()Returns an instance ofMetadata.Builderwhich can be used to build new instances ofMetadatainstance which are full copies of thisMetadata.org.infinispan.counter.api.CounterConfigurationcounterConfiguration()longcreated()static MetaParamsInternalMetadataempty()booleanequals(Object o)longexpiryTime()<T extends MetaParam>
Optional<T>findMetaParam(Class<T> type)static Metadatafrom(MetaParams params)static MetaParamsInternalMetadata.BuildergetBuilder(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.StringtoString()EntryVersionversion()Returns the version of the cache entry with which this metadata object is associated.
-
-
-
Method Detail
-
from
public static Metadata from(MetaParams params)
-
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
@ProtoField(number=7) public org.infinispan.counter.api.CounterConfiguration counterConfiguration()
-
version
public EntryVersion version()
Description copied from interface:MetadataReturns the version of the cache entry with which this metadata object is associated.
-
builder
public MetaParamsInternalMetadata.Builder 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
public <T extends MetaParam> Optional<T> findMetaParam(Class<T> type)
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()
-
getBuilder
public static MetaParamsInternalMetadata.Builder getBuilder(MetaParamsInternalMetadata metadata)
-
empty
public static MetaParamsInternalMetadata empty()
-
-