Package org.infinispan.protostream
Interface SerializationContext
- All Superinterfaces:
ImmutableSerializationContext
- All Known Implementing Classes:
SerializationContextImpl
A repository for Protobuf type definitions and their marshallers. All ProtoStream marshalling operations happen in
the context of a
SerializationContext
.- Since:
- 1.0
- Author:
- [email protected]
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Interface to be implemented for dynamic lookup of marshallers where the type is part of the entity being marshalled.static interface
Deprecated.Since 4.4. -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerMarshaller
(BaseMarshaller<?> marshaller) Register a type marshaller.void
registerMarshallerProvider
(SerializationContext.InstanceMarshallerProvider<?> marshallerProvider) void
registerMarshallerProvider
(SerializationContext.MarshallerProvider marshallerProvider) Deprecated.Since 4.4.void
Register some proto schema definition files from aFileDescriptorSource
.void
unregisterMarshaller
(BaseMarshaller<?> marshaller) void
unregisterMarshallerProvider
(SerializationContext.InstanceMarshallerProvider<?> marshallerProvider) void
unregisterMarshallerProvider
(SerializationContext.MarshallerProvider marshallerProvider) Deprecated.Since 4.4.void
unregisterProtoFile
(String fileName) Unregisters a file.void
unregisterProtoFiles
(Set<String> fileNames) Unregisters a set of files.Methods inherited from interface org.infinispan.protostream.ImmutableSerializationContext
canMarshall, canMarshall, canMarshall, getConfiguration, getDescriptorByName, getDescriptorByTypeId, getEnumDescriptor, getFileDescriptors, getGenericDescriptors, getMarshaller, getMarshaller, getMarshaller, getMessageDescriptor, getTypeIdByName, getTypeNameById
-
Method Details
-
registerProtoFiles
Register some proto schema definition files from aFileDescriptorSource
.- Parameters:
source
-- Throws:
DescriptorParserException
-
unregisterProtoFile
Unregisters a file. All types defined in it are removed and also the types from all dependant files. The status of dependant files is set to 'unresolved'. -
unregisterProtoFiles
Unregisters a set of files. All types defined in them are removed and also the types from all dependant files. The status of dependant files is set to 'unresolved'. -
registerMarshaller
Register a type marshaller.- Parameters:
marshaller
- the marshaller instance
-
unregisterMarshaller
-
registerMarshallerProvider
@Deprecated void registerMarshallerProvider(SerializationContext.MarshallerProvider marshallerProvider) Deprecated.Since 4.4. Replaced by the more flexibleSerializationContext.InstanceMarshallerProvider
. To be removed in 5. -
unregisterMarshallerProvider
@Deprecated void unregisterMarshallerProvider(SerializationContext.MarshallerProvider marshallerProvider) Deprecated.Since 4.4. Replaced by the more flexibleSerializationContext.InstanceMarshallerProvider
. To be removed in 5. -
registerMarshallerProvider
void registerMarshallerProvider(SerializationContext.InstanceMarshallerProvider<?> marshallerProvider) -
unregisterMarshallerProvider
void unregisterMarshallerProvider(SerializationContext.InstanceMarshallerProvider<?> marshallerProvider)
-