Package org.infinispan.marshall.core
Interface MarshalledEntry<K,V>
-
- All Known Implementing Classes:
MarshalledEntryImpl
public interface MarshalledEntry<K,V>
Defines an externally persisted entry. External stores that keep the data in serialised form should return an MarshalledEntry that contains the data in binary form (ByteBuffer) and unmarshall it lazily when getKey/Value/Metadata are invoked. This approach avoids unnecessary object (de)serialization e.g when the entries are fetched from the external store for the sole purpose of being sent over the wire to another requestor node.- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description K
getKey()
Returns the same key asgetKeyBytes()
, but unmarshalled.ByteBuffer
getKeyBytes()
Returns the key in serialized format.InternalMetadata
getMetadata()
ByteBuffer
getMetadataBytes()
V
getValue()
Returns the same value asgetKeyBytes()
, but unmarshalled.ByteBuffer
getValueBytes()
Returns the value in serialize format.
-
-
-
Method Detail
-
getKeyBytes
ByteBuffer getKeyBytes()
Returns the key in serialized format.
-
getValueBytes
ByteBuffer getValueBytes()
Returns the value in serialize format.
-
getMetadataBytes
ByteBuffer getMetadataBytes()
- Returns:
- null if there's no metadata associated with the object (e.g. expiry info, version..)
-
getKey
K getKey()
Returns the same key asgetKeyBytes()
, but unmarshalled.
-
getValue
V getValue()
Returns the same value asgetKeyBytes()
, but unmarshalled.
-
getMetadata
InternalMetadata getMetadata()
- Returns:
- might be null if there's no metadata associated with the object (e.g. expiry info, version..).
-
-