Class MarshallableEntryImpl<K,V>
- java.lang.Object
-
- org.infinispan.marshall.persistence.impl.MarshallableEntryImpl<K,V>
-
- All Implemented Interfaces:
MarshallableEntry<K,V>
public class MarshallableEntryImpl<K,V> extends Object implements MarshallableEntry<K,V>
- Since:
- 10.0
- Author:
- Ryan Emerson
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longcreated()booleanequals(Object o)longexpiryTime()static longexpiryTime(Metadata metadata, long created, long lastUsed)PrivateMetadatagetInternalMetadata()org.infinispan.commons.io.ByteBuffergetInternalMetadataBytes()KgetKey()Returns the same key asMarshallableEntry.getKeyBytes(), but unmarshalled.org.infinispan.commons.io.ByteBuffergetKeyBytes()Returns the key in serialized format.MarshalledValuegetMarshalledValue()MetadatagetMetadata()org.infinispan.commons.io.ByteBuffergetMetadataBytes()VgetValue()Returns the same value asMarshallableEntry.getKeyBytes(), but unmarshalled.org.infinispan.commons.io.ByteBuffergetValueBytes()Returns the value in serialize format.inthashCode()booleanisExpired(long now)static booleanisExpired(Metadata metadata, long now, long created, long lastUsed)longlastUsed()StringtoString()
-
-
-
Method Detail
-
getKey
public K getKey()
Description copied from interface:MarshallableEntryReturns the same key asMarshallableEntry.getKeyBytes(), but unmarshalled.- Specified by:
getKeyin interfaceMarshallableEntry<K,V>
-
getValue
public V getValue()
Description copied from interface:MarshallableEntryReturns the same value asMarshallableEntry.getKeyBytes(), but unmarshalled.- Specified by:
getValuein interfaceMarshallableEntry<K,V>
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadatain interfaceMarshallableEntry<K,V>- Returns:
- might be null if there's no metadata associated with the object (e.g. expiry info, version..).
-
getInternalMetadata
public PrivateMetadata getInternalMetadata()
- Specified by:
getInternalMetadatain interfaceMarshallableEntry<K,V>- Returns:
nullif there is no internal metadata associated with the object.
-
getKeyBytes
public org.infinispan.commons.io.ByteBuffer getKeyBytes()
Description copied from interface:MarshallableEntryReturns the key in serialized format.- Specified by:
getKeyBytesin interfaceMarshallableEntry<K,V>
-
getValueBytes
public org.infinispan.commons.io.ByteBuffer getValueBytes()
Description copied from interface:MarshallableEntryReturns the value in serialize format.- Specified by:
getValueBytesin interfaceMarshallableEntry<K,V>
-
getMetadataBytes
public org.infinispan.commons.io.ByteBuffer getMetadataBytes()
- Specified by:
getMetadataBytesin interfaceMarshallableEntry<K,V>- Returns:
- null if there's no metadata associated with the object (e.g. expiry info, version..)
-
getInternalMetadataBytes
public org.infinispan.commons.io.ByteBuffer getInternalMetadataBytes()
- Specified by:
getInternalMetadataBytesin interfaceMarshallableEntry<K,V>- Returns:
nullif there is no internal metadata associated with the object.
-
created
public long created()
- Specified by:
createdin interfaceMarshallableEntry<K,V>
-
lastUsed
public long lastUsed()
- Specified by:
lastUsedin interfaceMarshallableEntry<K,V>
-
isExpired
public boolean isExpired(long now)
- Specified by:
isExpiredin interfaceMarshallableEntry<K,V>
-
isExpired
public static boolean isExpired(Metadata metadata, long now, long created, long lastUsed)
-
expiryTime
public long expiryTime()
- Specified by:
expiryTimein interfaceMarshallableEntry<K,V>
-
expiryTime
public static long expiryTime(Metadata metadata, long created, long lastUsed)
-
getMarshalledValue
public MarshalledValue getMarshalledValue()
- Specified by:
getMarshalledValuein interfaceMarshallableEntry<K,V>
-
-