Interface ProtoStreamMarshallerProvider
-
- All Superinterfaces:
org.infinispan.protostream.BaseMarshaller<Object>,Marshallable<Object>,org.infinispan.protostream.ProtobufTagMarshaller<Object>,ProtoStreamMarshaller<Object>,Readable<Object>,Writable<Object>
- All Known Implementing Classes:
AtomicMarshallerProvider,ConcurrentMarshallerProvider,MarshallingMarshallerProvider,MathMarshallerProvider,NetMarshallerProvider,OptionalMarshaller,SQLMarshallerProvider,TimeMarshallerProvider,UtilMarshallerProvider
public interface ProtoStreamMarshallerProvider extends ProtoStreamMarshaller<Object>
Provides aProtoStreamMarshaller.- Author:
- Paul Ferraro
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> ProtoStreamMarshaller<T>cast(Class<T> type)default Class<? extends Object>getJavaClass()Returns the type of object handled by this marshallable instance.ProtoStreamMarshaller<?>getMarshaller()default Objectread(org.infinispan.protostream.ProtobufTagMarshaller.ReadContext context)default ObjectreadFrom(ProtoStreamReader reader)Reads an object from the specified reader.default OptionalIntsize(ProtoStreamSizeOperation operation, Object value)Computes the size of the specified object.default voidwrite(org.infinispan.protostream.ProtobufTagMarshaller.WriteContext context, Object value)default voidwriteTo(ProtoStreamWriter writer, Object value)Writes the specified object to the specified writer.-
Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamMarshaller
getTypeName
-
-
-
-
Method Detail
-
getMarshaller
ProtoStreamMarshaller<?> getMarshaller()
-
readFrom
default Object readFrom(ProtoStreamReader reader) throws IOException
Description copied from interface:ReadableReads an object from the specified reader.- Specified by:
readFromin interfaceReadable<Object>- Parameters:
reader- a ProtoStream reader- Returns:
- the read object
- Throws:
IOException- if the object could not be read
-
writeTo
default void writeTo(ProtoStreamWriter writer, Object value) throws IOException
Description copied from interface:WritableWrites the specified object to the specified writer.- Specified by:
writeToin interfaceWritable<Object>- Parameters:
writer- a ProtoStream writervalue- the object to be written- Throws:
IOException- if the object could not be written
-
read
default Object read(org.infinispan.protostream.ProtobufTagMarshaller.ReadContext context) throws IOException
- Specified by:
readin interfaceorg.infinispan.protostream.ProtobufTagMarshaller<Object>- Specified by:
readin interfaceProtoStreamMarshaller<Object>- Throws:
IOException
-
write
default void write(org.infinispan.protostream.ProtobufTagMarshaller.WriteContext context, Object value) throws IOException- Specified by:
writein interfaceorg.infinispan.protostream.ProtobufTagMarshaller<Object>- Specified by:
writein interfaceProtoStreamMarshaller<Object>- Throws:
IOException
-
size
default OptionalInt size(ProtoStreamSizeOperation operation, Object value)
Description copied from interface:MarshallableComputes the size of the specified object.- Specified by:
sizein interfaceMarshallable<Object>value- the value whose size is to be calculated- Returns:
- an optional buffer size, only present if the buffer size could be computed
-
getJavaClass
default Class<? extends Object> getJavaClass()
Description copied from interface:MarshallableReturns the type of object handled by this marshallable instance.- Specified by:
getJavaClassin interfaceorg.infinispan.protostream.BaseMarshaller<Object>- Specified by:
getJavaClassin interfaceMarshallable<Object>- Returns:
- the type of object handled by this marshallable instance.
-
cast
default <T> ProtoStreamMarshaller<T> cast(Class<T> type)
-
-