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 classRemoteMetadata.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.Builderbuilder()Returns an instance ofMetadata.Builderwhich can be used to build new instances ofMetadatainstance which are full copies of thisMetadata.longcreated()longexpiryTime()AddressgetAddress()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.
-
-
-
Constructor Detail
-
RemoteMetadata
public RemoteMetadata(Address address, EntryVersion version)
-
-
Method Detail
-
getAddress
public Address getAddress()
-
created
public long created()
- Specified by:
createdin interfaceInternalMetadata
-
lastUsed
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
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
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.
-
version
public EntryVersion version()
Description copied from interface:MetadataReturns the version of the cache entry with which this metadata object is associated.
-
builder
public Metadata.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
-
-