Class BinaryExternalizer<T,X,Y>
- java.lang.Object
-
- org.wildfly.clustering.marshalling.spi.BinaryExternalizer<T,X,Y>
-
- All Implemented Interfaces:
Externalizer<T>
public class BinaryExternalizer<T,X,Y> extends Object implements Externalizer<T>
GenericExternalizerfor an object composed of 2 externalizable components.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description BinaryExternalizer(Class<T> targetClass, Externalizer<X> externalizer1, Externalizer<Y> externalizer2, Function<T,X> accessor1, Function<T,Y> accessor2, BiFunction<X,Y,T> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<T>getTargetClass()TreadObject(ObjectInput input)OptionalIntsize(T object)voidwriteObject(ObjectOutput output, T object)
-
-
-
Method Detail
-
writeObject
public void writeObject(ObjectOutput output, T object) throws IOException
- Specified by:
writeObjectin interfaceExternalizer<T>- Throws:
IOException
-
readObject
public T readObject(ObjectInput input) throws IOException, ClassNotFoundException
- Specified by:
readObjectin interfaceExternalizer<T>- Throws:
IOExceptionClassNotFoundException
-
getTargetClass
public Class<T> getTargetClass()
- Specified by:
getTargetClassin interfaceExternalizer<T>
-
size
public OptionalInt size(T object)
- Specified by:
sizein interfaceExternalizer<T>
-
-