Class InternalMetadataImpl
java.lang.Object
org.infinispan.metadata.impl.InternalMetadataImpl
- All Implemented Interfaces:
InternalMetadata
,Metadata
- Since:
- 6.0
- Author:
- Mircea Markus
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.metadata.Metadata
Metadata.Builder
-
Constructor Summary
ConstructorsConstructorDescriptionInternalMetadataImpl
(InternalCacheEntry<?, ?> ice) InternalMetadataImpl
(Metadata actual, long created, long lastUsed) -
Method Summary
Modifier and TypeMethodDescriptionactual()
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
long
static Metadata
extractMetadata
(Metadata metadata) int
hashCode()
boolean
isEmpty()
Returns whether this metadata is effectively empty, that is that persisting or replicating it to another node would be no different then sending a null metadata object.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()
version()
Returns the version of the cache entry with which this metadata object is associated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.infinispan.metadata.Metadata
updateCreationTimestamp
-
Constructor Details
-
InternalMetadataImpl
-
InternalMetadataImpl
-
-
Method Details
-
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
Description copied from interface:Metadata
Returns the version of the cache entry with which this metadata object is associated. -
isEmpty
public boolean isEmpty()Description copied from interface:Metadata
Returns whether this metadata is effectively empty, that is that persisting or replicating it to another node would be no different then sending a null metadata object. -
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
@ProtoField(1) public long created()- Specified by:
created
in interfaceInternalMetadata
-
lastUsed
@ProtoField(2) public long lastUsed()- Specified by:
lastUsed
in interfaceInternalMetadata
-
actual
-
expiryTime
public long expiryTime()- Specified by:
expiryTime
in interfaceInternalMetadata
-
isExpired
public boolean isExpired(long now) - Specified by:
isExpired
in interfaceInternalMetadata
-
equals
-
hashCode
-
toString
-
extractMetadata
-