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 java.lang.Object implements MarshalledEntry<K,V>
- Since:
- 6.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMarshalledEntryImpl.Externalizer
-
Constructor Summary
Constructors Constructor Description MarshalledEntryImpl(K key, ByteBuffer valueBytes, ByteBuffer metadataBytes, StreamingMarshaller marshaller)MarshalledEntryImpl(K key, V value, InternalMetadata im, StreamingMarshaller sm)MarshalledEntryImpl(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, 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.booleanequals(java.lang.Object o)KgetKey()Returns the same key asMarshalledEntry.getKeyBytes(), but unmarshalled.ByteBuffergetKeyBytes()Returns the key in serialized format.InternalMetadatagetMetadata()ByteBuffergetMetadataBytes()VgetValue()Returns the same value asMarshalledEntry.getKeyBytes(), but unmarshalled.ByteBuffergetValueBytes()Returns the value in serialize format.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
MarshalledEntryImpl
public MarshalledEntryImpl(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, StreamingMarshaller marshaller)
-
MarshalledEntryImpl
public MarshalledEntryImpl(K key, ByteBuffer valueBytes, ByteBuffer metadataBytes, StreamingMarshaller marshaller)
-
MarshalledEntryImpl
public MarshalledEntryImpl(K key, V value, InternalMetadata im, 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:MarshalledEntryReturns the same key asMarshalledEntry.getKeyBytes(), but unmarshalled.- Specified by:
getKeyin interfaceMarshalledEntry<K,V>
-
getValue
public V getValue()
Description copied from interface:MarshalledEntryReturns the same value asMarshalledEntry.getKeyBytes(), but unmarshalled.- Specified by:
getValuein interfaceMarshalledEntry<K,V>
-
getMetadata
public InternalMetadata getMetadata()
- Specified by:
getMetadatain interfaceMarshalledEntry<K,V>- Returns:
- might be null if there's no metadata associated with the object (e.g. expiry info, version..).
-
getKeyBytes
public ByteBuffer getKeyBytes()
Description copied from interface:MarshalledEntryReturns the key in serialized format.- Specified by:
getKeyBytesin interfaceMarshalledEntry<K,V>
-
getValueBytes
public ByteBuffer getValueBytes()
Description copied from interface:MarshalledEntryReturns the value in serialize format.- Specified by:
getValueBytesin interfaceMarshalledEntry<K,V>
-
getMetadataBytes
public ByteBuffer getMetadataBytes()
- Specified by:
getMetadataBytesin interfaceMarshalledEntry<K,V>- Returns:
- null if there's no metadata associated with the object (e.g. expiry info, version..)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-