Package org.infinispan.marshall.core
Class MarshalledEntryImpl<K,V>
- java.lang.Object
-
- org.infinispan.marshall.core.MarshalledEntryImpl<K,V>
-
- All Implemented Interfaces:
MarshalledEntry<K,V>
public class MarshalledEntryImpl<K,V> extends Object implements MarshalledEntry<K,V>
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MarshalledEntryImpl.Externalizer
-
Constructor Summary
Constructors Constructor Description MarshalledEntryImpl(K key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.marshall.StreamingMarshaller marshaller)
MarshalledEntryImpl(K key, V value, InternalMetadata im, org.infinispan.commons.marshall.StreamingMarshaller sm)
MarshalledEntryImpl(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.marshall.StreamingMarshaller marshaller)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
MarshalledEntry<K,V>empty()
Returns the value that should be used as an empty MarshalledEntry.boolean
equals(Object o)
K
getKey()
Returns the same key asMarshalledEntry.getKeyBytes()
, but unmarshalled.org.infinispan.commons.io.ByteBuffer
getKeyBytes()
Returns the key in serialized format.InternalMetadata
getMetadata()
org.infinispan.commons.io.ByteBuffer
getMetadataBytes()
V
getValue()
Returns the same value asMarshalledEntry.getKeyBytes()
, but unmarshalled.org.infinispan.commons.io.ByteBuffer
getValueBytes()
Returns the value in serialize format.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
MarshalledEntryImpl
public MarshalledEntryImpl(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.marshall.StreamingMarshaller marshaller)
-
MarshalledEntryImpl
public MarshalledEntryImpl(K key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.marshall.StreamingMarshaller marshaller)
-
MarshalledEntryImpl
public MarshalledEntryImpl(K key, V value, InternalMetadata im, org.infinispan.commons.marshall.StreamingMarshaller sm)
-
-
Method Detail
-
empty
public static <K,V> MarshalledEntry<K,V> empty()
Returns the value that should be used as an empty MarshalledEntry. This can be useful when a non null value is required.- Type Parameters:
K
- key typeV
- value type- Returns:
- cached empty marshalled entry
-
getKey
public K getKey()
Description copied from interface:MarshalledEntry
Returns the same key asMarshalledEntry.getKeyBytes()
, but unmarshalled.- Specified by:
getKey
in interfaceMarshalledEntry<K,V>
-
getValue
public V getValue()
Description copied from interface:MarshalledEntry
Returns the same value asMarshalledEntry.getKeyBytes()
, but unmarshalled.- Specified by:
getValue
in interfaceMarshalledEntry<K,V>
-
getMetadata
public InternalMetadata getMetadata()
- Specified by:
getMetadata
in interfaceMarshalledEntry<K,V>
- Returns:
- might be null if there's no metadata associated with the object (e.g. expiry info, version..).
-
getKeyBytes
public org.infinispan.commons.io.ByteBuffer getKeyBytes()
Description copied from interface:MarshalledEntry
Returns the key in serialized format.- Specified by:
getKeyBytes
in interfaceMarshalledEntry<K,V>
-
getValueBytes
public org.infinispan.commons.io.ByteBuffer getValueBytes()
Description copied from interface:MarshalledEntry
Returns the value in serialize format.- Specified by:
getValueBytes
in interfaceMarshalledEntry<K,V>
-
getMetadataBytes
public org.infinispan.commons.io.ByteBuffer getMetadataBytes()
- Specified by:
getMetadataBytes
in interfaceMarshalledEntry<K,V>
- Returns:
- null if there's no metadata associated with the object (e.g. expiry info, version..)
-
-