Package org.infinispan.metadata.impl
Class InternalMetadataImpl
- java.lang.Object
-
- org.infinispan.metadata.impl.InternalMetadataImpl
-
- All Implemented Interfaces:
InternalMetadata
,Metadata
public class InternalMetadataImpl extends Object implements InternalMetadata
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InternalMetadataImpl.Externalizer
-
Nested classes/interfaces inherited from interface org.infinispan.metadata.Metadata
Metadata.Builder
-
-
Constructor Summary
Constructors Constructor Description InternalMetadataImpl()
InternalMetadataImpl(InternalCacheEntry ice)
InternalMetadataImpl(InternalCacheValue icv)
InternalMetadataImpl(Metadata actual, long created, long lastUsed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Metadata
actual()
Metadata.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()
boolean
equals(Object o)
long
expiryTime()
int
hashCode()
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.
-
-
-
Constructor Detail
-
InternalMetadataImpl
public InternalMetadataImpl()
-
InternalMetadataImpl
public InternalMetadataImpl(InternalCacheEntry ice)
-
InternalMetadataImpl
public InternalMetadataImpl(InternalCacheValue icv)
-
InternalMetadataImpl
public InternalMetadataImpl(Metadata actual, long created, long lastUsed)
-
-
Method Detail
-
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 Metadata.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
-
created
public long created()
- Specified by:
created
in interfaceInternalMetadata
-
lastUsed
public long lastUsed()
- Specified by:
lastUsed
in interfaceInternalMetadata
-
actual
public Metadata actual()
-
expiryTime
public long expiryTime()
- Specified by:
expiryTime
in interfaceInternalMetadata
-
isExpired
public boolean isExpired(long now)
- Specified by:
isExpired
in interfaceInternalMetadata
-
-