Class MarshallerRegistration
- java.lang.Object
-
- org.infinispan.query.remote.client.impl.MarshallerRegistration
-
- All Implemented Interfaces:
SerializationContextInitializer
public final class MarshallerRegistration extends Object implements SerializationContextInitializer
Registers protobuf schemas and marshallers for the objects used by remote query, remote continuous query and Ickle based filters.- Since:
- 6.0
- Author:
- anistor@redhat.com
-
-
Field Summary
Fields Modifier and Type Field Description static MarshallerRegistrationINSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProtoFile()Returns the contents of the proto file as aString.StringgetProtoFileName()Returns the name of the proto file (which is allowed to contain slashes, so it could look like a path).static voidinit(SerializationContext ctx)Registers proto files and marshallers.voidregisterMarshallers(SerializationContext ctx)Registers marshallers to the givenSerializationContext.This is always invoked afterSerializationContextInitializer.registerSchema(org.infinispan.protostream.SerializationContext).voidregisterSchema(SerializationContext serCtx)Registers schema files to the givenSerializationContext.
-
-
-
Field Detail
-
INSTANCE
public static final MarshallerRegistration INSTANCE
-
-
Method Detail
-
getProtoFileName
public String getProtoFileName()
Description copied from interface:SerializationContextInitializerReturns the name of the proto file (which is allowed to contain slashes, so it could look like a path).- Specified by:
getProtoFileNamein interfaceSerializationContextInitializer
-
getProtoFile
public String getProtoFile()
Description copied from interface:SerializationContextInitializerReturns the contents of the proto file as aString. The returned value must be guaranteed to be the same (equals) on each invocation. Implementations can return a constant or a value stored in memory but they are generally free to also retrieve it from somewhere else, including the classpath, the disk, or even a mechanism that can potentially fail with anUncheckedIOException.- Specified by:
getProtoFilein interfaceSerializationContextInitializer
-
registerSchema
public void registerSchema(SerializationContext serCtx)
Description copied from interface:SerializationContextInitializerRegisters schema files to the givenSerializationContext. This is always invoked beforeSerializationContextInitializer.registerMarshallers(org.infinispan.protostream.SerializationContext).- Specified by:
registerSchemain interfaceSerializationContextInitializer
-
registerMarshallers
public void registerMarshallers(SerializationContext ctx)
Description copied from interface:SerializationContextInitializerRegisters marshallers to the givenSerializationContext.This is always invoked afterSerializationContextInitializer.registerSchema(org.infinispan.protostream.SerializationContext).- Specified by:
registerMarshallersin interfaceSerializationContextInitializer
-
init
public static void init(SerializationContext ctx)
Registers proto files and marshallers.- Parameters:
ctx- the serialization context
-
-