Package org.infinispan.persistence.spi
Interface MarshallableEntryFactory<K,V>
-
public interface MarshallableEntryFactory<K,V>Factory forMarshallableEntry.- Since:
- 10.0
- Author:
- Ryan Emerson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MarshallableEntry<K,V>create(Object key)valuedefaults to nullMarshallableEntry<K,V>create(Object key, Object value)metadatadefaults to nullcreateddefaults to -1lastUseddefaults to -1MarshallableEntry<K,V>create(Object key, Object value, Metadata metadata, long created, long lastUsed)Creates aMarshallableEntryusing non-marshalled POJOs as argumentsMarshallableEntry<K,V>create(Object key, ByteBuffer valueBytes, ByteBuffer metadataBytes, long created, long lastUsed)Creates aMarshallableEntryusing a object key and already marshalled value/metadata as argumentsMarshallableEntry<K,V>create(Object key, MarshalledValue value)Creates aMarshallableEntryusing a KeyMarshalledValue.MarshallableEntry<K,V>create(ByteBuffer key, ByteBuffer valueBytes)metadataBytesdefaults to nullcreateddefaults to -1lastUseddefaults to -1MarshallableEntry<K,V>create(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, long created, long lastUsed)Creates aMarshallableEntryusing already marshalled objects as argumentsMarshallableEntry<K,V>getEmpty()
-
-
-
Method Detail
-
create
MarshallableEntry<K,V> create(ByteBuffer key, ByteBuffer valueBytes)
metadataBytesdefaults to nullcreateddefaults to -1lastUseddefaults to -1
-
create
MarshallableEntry<K,V> create(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, long created, long lastUsed)
Creates aMarshallableEntryusing already marshalled objects as arguments- Parameters:
key-ByteBufferof serialized key objectvalueBytes-ByteBufferof serialized value objectmetadataBytes-ByteBufferof serialized metadata objectcreated- timestamp of when the entry was created, -1 means this value is ignoredlastUsed- timestamp of last time entry was accessed in memory- Returns:
MarshallableEntryinstance that lazily handles unmarshalling of keys, values and metadata via theMarshallableEntry.getKey(),MarshallableEntry.getValue()andMarshallableEntry.getMetadata()methods.
-
create
MarshallableEntry<K,V> create(Object key, ByteBuffer valueBytes, ByteBuffer metadataBytes, long created, long lastUsed)
Creates aMarshallableEntryusing a object key and already marshalled value/metadata as arguments- Parameters:
key- entry keyvalueBytes-ByteBufferof serialized value objectmetadataBytes-ByteBufferof serialized metadata objectcreated- timestamp of when the entry was created, -1 means this value is ignoredlastUsed- timestamp of last time entry was accessed in memory- Returns:
MarshallableEntryinstance that lazily handles unmarshalling of values and metadata via theMarshallableEntry.getKey(),MarshallableEntry.getValue()andMarshallableEntry.getMetadata()methods.
-
create
MarshallableEntry<K,V> create(Object key)
valuedefaults to null- See Also:
create(Object, Object)
-
create
MarshallableEntry<K,V> create(Object key, Object value)
metadatadefaults to nullcreateddefaults to -1lastUseddefaults to -1
-
create
MarshallableEntry<K,V> create(Object key, Object value, Metadata metadata, long created, long lastUsed)
Creates aMarshallableEntryusing non-marshalled POJOs as arguments- Parameters:
key- entry keyvalue- entry valuemetadata- entry metadatacreated- timestamp of when the entry was created, -1 means this value is ignoredlastUsed- timestamp of last time entry was accessed in memory- Returns:
MarshallableEntryinstance that lazily handles serialization of keys, values and metadata via theMarshallableEntry.getKeyBytes(),MarshallableEntry.getValueBytes()andMarshallableEntry.getMetadataBytes()methods.
-
create
MarshallableEntry<K,V> create(Object key, MarshalledValue value)
Creates aMarshallableEntryusing a KeyMarshalledValue.- Parameters:
key- entry keyvalue- aMarshalledValuewhose values are used to populateMarshallableEntry.getValueBytes(),MarshallableEntry.getMetadataBytes(),MarshallableEntry.created()andMarshallableEntry.lastUsed()fields.- Returns:
MarshallableEntryinstance that lazily handles unmarshalling of keys, values and metadata via theMarshallableEntry.getKey(),MarshallableEntry.getValue()andMarshallableEntry.getMetadata()methods.
-
getEmpty
MarshallableEntry<K,V> getEmpty()
- Returns:
- a cached empty
MarshallableEntryinstance.
-
-