Class MarshalledEntryFactoryImpl
- java.lang.Object
-
- org.infinispan.marshall.persistence.impl.MarshalledEntryFactoryImpl
-
- All Implemented Interfaces:
MarshallableEntryFactory
public class MarshalledEntryFactoryImpl extends Object implements MarshallableEntryFactory
- Since:
- 10.0
- Author:
- Ryan Emerson
-
-
Constructor Summary
Constructors Constructor Description MarshalledEntryFactoryImpl()MarshalledEntryFactoryImpl(org.infinispan.commons.marshall.Marshaller marshaller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarshallableEntrycreate(Object key)valuedefaults to nullMarshallableEntrycreate(Object key, Object value)metadatadefaults to nullcreateddefaults to -1lastUseddefaults to -1MarshallableEntrycreate(Object key, Object value, Metadata metadata, PrivateMetadata internalMetadata, long created, long lastUsed)Creates aMarshallableEntryusing non-marshalled POJOs as argumentsMarshallableEntrycreate(Object key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.io.ByteBuffer internalMetadataBytes, long created, long lastUsed)Creates aMarshallableEntryusing a object key and already marshalled value/metadata as argumentsMarshallableEntrycreate(Object key, MarshalledValue value)Creates aMarshallableEntryusing a KeyMarshalledValue.MarshallableEntrycreate(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes)metadataBytesdefaults to nullcreateddefaults to -1lastUseddefaults to -1MarshallableEntrycreate(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.io.ByteBuffer internalMetadataBytes, long created, long lastUsed)Creates aMarshallableEntryusing already marshalled objects as argumentsMarshallableEntrygetEmpty()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.persistence.spi.MarshallableEntryFactory
create, create
-
-
-
-
Method Detail
-
create
public MarshallableEntry create(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes)
Description copied from interface:MarshallableEntryFactorymetadataBytesdefaults to nullcreateddefaults to -1lastUseddefaults to -1- Specified by:
createin interfaceMarshallableEntryFactory- See Also:
MarshallableEntryFactory.create(ByteBuffer, ByteBuffer, ByteBuffer, ByteBuffer, long, long)
-
create
public MarshallableEntry create(org.infinispan.commons.io.ByteBuffer key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.io.ByteBuffer internalMetadataBytes, long created, long lastUsed)
Description copied from interface:MarshallableEntryFactoryCreates aMarshallableEntryusing already marshalled objects as arguments- Specified by:
createin interfaceMarshallableEntryFactory- Parameters:
key-ByteBufferof serialized key objectvalueBytes-ByteBufferof serialized value objectmetadataBytes-ByteBufferof serialized metadata objectinternalMetadataBytes-ByteBufferof 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:
MarshallableEntryinstance that lazily handles unmarshalling of keys, values and metadata via theMarshallableEntry.getKey(),MarshallableEntry.getValue()andMarshallableEntry.getMetadata()methods.
-
create
public MarshallableEntry create(Object key, org.infinispan.commons.io.ByteBuffer valueBytes, org.infinispan.commons.io.ByteBuffer metadataBytes, org.infinispan.commons.io.ByteBuffer internalMetadataBytes, long created, long lastUsed)
Description copied from interface:MarshallableEntryFactoryCreates aMarshallableEntryusing a object key and already marshalled value/metadata as arguments- Specified by:
createin interfaceMarshallableEntryFactory- Parameters:
key- entry keyvalueBytes-ByteBufferof serialized value objectmetadataBytes-ByteBufferof serialized metadata objectinternalMetadataBytes-ByteBufferof 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:
MarshallableEntryinstance that lazily handles unmarshalling of values and metadata via theMarshallableEntry.getKey(),MarshallableEntry.getValue()andMarshallableEntry.getMetadata()methods.
-
create
public MarshallableEntry create(Object key)
Description copied from interface:MarshallableEntryFactoryvaluedefaults to null- Specified by:
createin interfaceMarshallableEntryFactory- See Also:
MarshallableEntryFactory.create(Object, Object)
-
create
public MarshallableEntry create(Object key, Object value)
Description copied from interface:MarshallableEntryFactorymetadatadefaults to nullcreateddefaults to -1lastUseddefaults to -1- Specified by:
createin interfaceMarshallableEntryFactory- See Also:
MarshallableEntryFactory.create(Object, Object, Metadata, PrivateMetadata, long, long)
-
create
public MarshallableEntry create(Object key, Object value, Metadata metadata, PrivateMetadata internalMetadata, long created, long lastUsed)
Description copied from interface:MarshallableEntryFactoryCreates aMarshallableEntryusing non-marshalled POJOs as arguments- Specified by:
createin interfaceMarshallableEntryFactory- 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:
MarshallableEntryinstance that lazily handles serialization of keys, values and metadata via theMarshallableEntry.getKeyBytes(),MarshallableEntry.getValueBytes()andMarshallableEntry.getMetadataBytes()methods.
-
create
public MarshallableEntry create(Object key, MarshalledValue value)
Description copied from interface:MarshallableEntryFactoryCreates aMarshallableEntryusing a KeyMarshalledValue.- Specified by:
createin interfaceMarshallableEntryFactory- 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
public MarshallableEntry getEmpty()
- Specified by:
getEmptyin interfaceMarshallableEntryFactory- Returns:
- a cached empty
MarshallableEntryinstance.
-
-