Package org.infinispan.container.entries
Class RemoteMetadata
- java.lang.Object
-
- org.infinispan.container.entries.RemoteMetadata
-
- All Implemented Interfaces:
InternalMetadata
,Metadata
public class RemoteMetadata extends Object implements InternalMetadata
This is a metadata type used by scattered cache during state transfer. The address points to node which has last known version of given entry: During key transfer RemoteMetadata is created and overwritten if another response with higher version comes. During value transfer the address is already final and we request the value + metadata only from this node.- Author:
- Radim Vansa <rvansa@redhat.com>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RemoteMetadata.Externalizer
-
Nested classes/interfaces inherited from interface org.infinispan.metadata.Metadata
Metadata.Builder
-
-
Constructor Summary
Constructors Constructor Description RemoteMetadata(Address address, EntryVersion version)
-
Method Summary
All Methods Instance Methods Concrete 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
created()
long
expiryTime()
Address
getAddress()
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
-
RemoteMetadata
public RemoteMetadata(Address address, EntryVersion version)
-
-
Method Detail
-
getAddress
public Address getAddress()
-
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 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
-
-