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 Default Methods Modifier and Type Method Description MarshallableEntry<K,V>
create(Object key)
value
defaults to nullMarshallableEntry<K,V>
create(Object key, Object value)
metadata
defaults to nullcreated
defaults to -1lastUsed
defaults to -1MarshallableEntry<K,V>
create(Object key, Object value, Metadata metadata, org.infinispan.metadata.impl.PrivateMetadata internalMetadata, long created, long lastUsed)
Creates aMarshallableEntry
using non-marshalled POJOs as argumentsMarshallableEntry<K,V>
create(Object key, ByteBuffer valueBytes, ByteBuffer metadataBytes, ByteBuffer internalMetadataBytes, long created, long lastUsed)
Creates aMarshallableEntry
using a object key and already marshalled value/metadata as argumentsdefault MarshallableEntry<K,V>
create(Object key, org.infinispan.container.entries.InternalCacheValue<V> v)
MarshallableEntry<K,V>
create(Object key, MarshalledValue value)
Creates aMarshallableEntry
using a KeyMarshalledValue
.MarshallableEntry<K,V>
create(ByteBuffer key, ByteBuffer valueBytes)
metadataBytes
defaults to nullcreated
defaults to -1lastUsed
defaults to -1MarshallableEntry<K,V>
create(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, ByteBuffer internalMetadataBytes, long created, long lastUsed)
Creates aMarshallableEntry
using already marshalled objects as argumentsdefault MarshallableEntry<K,V>
create(org.infinispan.container.entries.InternalCacheEntry<K,V> e)
Creates aMarshallableEntry
instance from anInternalCacheEntry
.MarshallableEntry<K,V>
getEmpty()
-
-
-
Method Detail
-
create
MarshallableEntry<K,V> create(ByteBuffer key, ByteBuffer valueBytes)
metadataBytes
defaults to nullcreated
defaults to -1lastUsed
defaults to -1
-
create
MarshallableEntry<K,V> create(ByteBuffer key, ByteBuffer valueBytes, ByteBuffer metadataBytes, ByteBuffer internalMetadataBytes, long created, long lastUsed)
Creates aMarshallableEntry
using already marshalled objects as arguments- Parameters:
key
-ByteBuffer
of serialized key objectvalueBytes
-ByteBuffer
of serialized value objectmetadataBytes
-ByteBuffer
of serialized metadata objectinternalMetadataBytes
-ByteBuffer
of serialized internal 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:
MarshallableEntry
instance 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, ByteBuffer internalMetadataBytes, long created, long lastUsed)
Creates aMarshallableEntry
using a object key and already marshalled value/metadata as arguments- Parameters:
key
- entry keyvalueBytes
-ByteBuffer
of serialized value objectmetadataBytes
-ByteBuffer
of serialized metadata objectinternalMetadataBytes
-ByteBuffer
of serialized internal 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:
MarshallableEntry
instance that lazily handles unmarshalling of values and metadata via theMarshallableEntry.getKey()
,MarshallableEntry.getValue()
andMarshallableEntry.getMetadata()
methods.
-
create
MarshallableEntry<K,V> create(Object key)
value
defaults to null- See Also:
create(Object, Object)
-
create
MarshallableEntry<K,V> create(Object key, Object value)
metadata
defaults to nullcreated
defaults to -1lastUsed
defaults to -1
-
create
MarshallableEntry<K,V> create(Object key, Object value, Metadata metadata, org.infinispan.metadata.impl.PrivateMetadata internalMetadata, long created, long lastUsed)
Creates aMarshallableEntry
using non-marshalled POJOs as arguments- Parameters:
key
- entry keyvalue
- entry valuemetadata
- entry metadatainternalMetadata
- entry internal metadatacreated
- timestamp of when the entry was created, -1 means this value is ignoredlastUsed
- timestamp of last time entry was accessed in memory- Returns:
MarshallableEntry
instance that lazily handles serialization of keys, values and metadata via theMarshallableEntry.getKeyBytes()
,MarshallableEntry.getValueBytes()
andMarshallableEntry.getMetadataBytes()
methods.
-
create
default MarshallableEntry<K,V> create(Object key, org.infinispan.container.entries.InternalCacheValue<V> v)
- Parameters:
key
- the entry key.v
- theInternalCacheValue
.
-
create
default MarshallableEntry<K,V> create(org.infinispan.container.entries.InternalCacheEntry<K,V> e)
Creates aMarshallableEntry
instance from anInternalCacheEntry
.- Parameters:
e
- theInternalCacheEntry
.
-
create
MarshallableEntry<K,V> create(Object key, MarshalledValue value)
Creates aMarshallableEntry
using a KeyMarshalledValue
.- Parameters:
key
- entry keyvalue
- aMarshalledValue
whose values are used to populateMarshallableEntry.getValueBytes()
,MarshallableEntry.getMetadataBytes()
,MarshallableEntry.created()
andMarshallableEntry.lastUsed()
fields.- Returns:
MarshallableEntry
instance 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
MarshallableEntry
instance.
-
-