Package org.infinispan.metadata
Interface Metadata
-
- All Known Subinterfaces:
InternalMetadata
- All Known Implementing Classes:
EmbeddedMetadata
,MemcachedMetadata
,MimeMetadata
,RemoteMetadata
public interface Metadata
This interface encapsulates metadata information that can be stored alongside values in the cache.- Since:
- 5.3
- Author:
- Galder ZamarreƱo
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Metadata.Builder
Metadata builder
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
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.EntryVersion
version()
Returns the version of the cache entry with which this metadata object is associated.
-
-
-
Method Detail
-
lifespan
long lifespan()
Returns the lifespan of the cache entry with which this metadata object is associated, in milliseconds. Negative values are interpreted as unlimited lifespan.- Returns:
- lifespan of the entry in number of milliseconds
-
maxIdle
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.- Returns:
- maximum idle time of the entry in number of milliseconds
-
version
EntryVersion version()
Returns the version of the cache entry with which this metadata object is associated.- Returns:
- version of the entry
-
builder
Metadata.Builder builder()
Returns an instance ofMetadata.Builder
which can be used to build new instances ofMetadata
instance which are full copies of thisMetadata
.- Returns:
- instance of
Metadata.Builder
-
-