Class MarshallableUserObject<T>
- java.lang.Object
-
- org.infinispan.marshall.protostream.impl.MarshallableUserObject<T>
-
@ProtoTypeId(2) public class MarshallableUserObject<T> extends Object
A wrapper message used by ProtoStream Marshallers to allow user objects to be marshalled/unmarshalled via theMarshallableUserObject.Marshallerimplementation, which delegates to the configured user marshaller inSerializationConfigurationif it exists.This abstraction hides the details of the configured user marshaller from our internal Pojos, so that all calls to the configured user marshaller can be limited to the
MarshallableUserObject.Marshallerinstance.In order to allow this object to be utilised by our internal ProtoStream annotated Pojos, we need to generate the proto schema for this object using the protostream-processor and
AutoProtoSchemaBuilder. Consequently, it's necessary for the generated marshaller to be overridden, therefore calls toSerializationContext.registerMarshaller(BaseMarshaller)must be made after the registration of any generatedSerializationContextInitializer's that contain this class. To ensure that the marshaller generated for this class is never used, we throw aIllegalStateExceptionif theProtoFactoryconstructor is called.- Since:
- 10.0
- Author:
- Ryan Emerson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMarshallableUserObject.Marshaller
-
Constructor Summary
Constructors Constructor Description MarshallableUserObject(T object)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Tget()inthashCode()static intsize(int objectBytes)
-
-
-
Constructor Detail
-
MarshallableUserObject
public MarshallableUserObject(T object)
-
-