T - the type of this marshallerV - the type of the mapped marshallerpublic class FunctionalMarshaller<T,V> extends Object implements ProtoStreamMarshaller<T>
| Constructor and Description |
|---|
FunctionalMarshaller(Class<T> targetClass,
Class<V> sourceClass,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
FunctionalMarshaller(Class<T> targetClass,
Function<org.infinispan.protostream.ImmutableSerializationContext,ProtoStreamMarshaller<V>> marshallerFactory,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
FunctionalMarshaller(Class<T> targetClass,
ProtoStreamMarshaller<V> marshaller,
org.wildfly.common.function.ExceptionFunction<T,V,IOException> function,
org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory) |
| Modifier and Type | Method and Description |
|---|---|
Class<? extends T> |
getJavaClass()
Returns the type of object handled by this marshallable instance.
|
T |
readFrom(ProtoStreamReader reader)
Reads an object from the specified reader.
|
OptionalInt |
size(org.infinispan.protostream.ImmutableSerializationContext context,
T object)
Predicts the size of the specified object that would be written via the
Marshallable.writeTo(ProtoStreamWriter, Object) method. |
void |
writeTo(ProtoStreamWriter writer,
T object)
Writes the specified object to the specified writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTypeName, readFrom, writeTopublic FunctionalMarshaller(Class<T> targetClass, Class<V> sourceClass, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public FunctionalMarshaller(Class<T> targetClass, ProtoStreamMarshaller<V> marshaller, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public FunctionalMarshaller(Class<T> targetClass, Function<org.infinispan.protostream.ImmutableSerializationContext,ProtoStreamMarshaller<V>> marshallerFactory, org.wildfly.common.function.ExceptionFunction<T,V,IOException> function, org.wildfly.common.function.ExceptionFunction<V,T,IOException> factory)
public T readFrom(ProtoStreamReader reader) throws IOException
MarshallablereadFrom in interface Marshallable<T>reader - a ProtoStream readerIOException - if the object could not be readpublic void writeTo(ProtoStreamWriter writer, T object) throws IOException
MarshallablewriteTo in interface Marshallable<T>writer - a ProtoStream writerobject - the object to be writtenIOException - if the object could not be writtenpublic OptionalInt size(org.infinispan.protostream.ImmutableSerializationContext context, T object)
MarshallableMarshallable.writeTo(ProtoStreamWriter, Object) method.size in interface Marshallable<T>context - a serialization contextobject - the object whose size is to be determinedpublic Class<? extends T> getJavaClass()
MarshallablegetJavaClass in interface org.infinispan.protostream.BaseMarshaller<T>getJavaClass in interface Marshallable<T>Copyright © 2021 JBoss by Red Hat. All rights reserved.