Class PersistenceMarshallerImpl
java.lang.Object
org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller
org.infinispan.marshall.persistence.impl.PersistenceMarshallerImpl
- All Implemented Interfaces:
org.infinispan.commons.marshall.Marshaller,org.infinispan.commons.marshall.StreamAwareMarshaller,PersistenceMarshaller
public class PersistenceMarshallerImpl
extends AbstractInternalProtoStreamMarshaller
implements PersistenceMarshaller
A Protostream based
PersistenceMarshaller implementation that is responsible
for marshalling/unmarshalling objects which are to be persisted.
Known internal objects that are required by stores and loaders, such as EmbeddedMetadata,
are registered with this marshaller's SerializationContext so that they can be natively marshalled by the
underlying Protostream marshaller. If no entry exists in the SerializationContext for a given object, then
the marshalling of said object is delegated to a user marshaller if configured
(SerializationConfiguration.MARSHALLER) and the generated bytes are wrapped
in a MarshallableUserObject object and marshalled by ProtoStream.
- Since:
- 10.0
- Author:
- Ryan Emerson
-
Field Summary
Fields inherited from class org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller
ctxRegistry, log, userMarshaller -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.infinispan.protostream.ImmutableSerializationContextvoidregister(org.infinispan.protostream.SerializationContextInitializer initializer) Registers the schemas and marshallers defined by the providedSerializationContextInitializerwith thePersistenceMarshaller'sSerializationContext.Methods inherited from class org.infinispan.marshall.protostream.impl.AbstractInternalProtoStreamMarshaller
getBufferSizePredictor, getUserMarshaller, isMarshallable, mediaType, objectFromByteBuffer, objectFromByteBuffer, objectToBuffer, objectToByteBuffer, objectToByteBuffer, readObject, sizeEstimate, start, unwrapAndInit, writeObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commons.marshall.Marshaller
getBufferSizePredictor, initialize, isMarshallable, mediaType, objectFromByteBuffer, objectFromByteBuffer, objectToBuffer, objectToByteBuffer, objectToByteBuffer, start, stopMethods inherited from interface org.infinispan.marshall.persistence.PersistenceMarshaller
getUserMarshallerMethods inherited from interface org.infinispan.commons.marshall.StreamAwareMarshaller
isMarshallable, mediaType, readObject, sizeEstimate, writeObject
-
Constructor Details
-
PersistenceMarshallerImpl
public PersistenceMarshallerImpl()
-
-
Method Details
-
getSerializationContext
public org.infinispan.protostream.ImmutableSerializationContext getSerializationContext()- Specified by:
getSerializationContextin classAbstractInternalProtoStreamMarshaller
-
register
public void register(org.infinispan.protostream.SerializationContextInitializer initializer) Description copied from interface:PersistenceMarshallerRegisters the schemas and marshallers defined by the providedSerializationContextInitializerwith thePersistenceMarshaller'sSerializationContext.- Specified by:
registerin interfacePersistenceMarshaller- Parameters:
initializer- whose schemas and marshallers' will be registered with thePersistenceMarshallerSerializationContext
-