Class LongExternalizer<T>
- java.lang.Object
-
- org.wildfly.clustering.marshalling.spi.LongExternalizer<T>
-
- All Implemented Interfaces:
Externalizer<T>
- Direct Known Subclasses:
DateExternalizer
public class LongExternalizer<T> extends Object implements Externalizer<T>
BaseExternalizerfor long-based externalization.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description LongExternalizer(Class<T> targetClass, LongFunction<T> reader, ToLongFunction<T> writer)
-
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)
-
-
-
Constructor Detail
-
LongExternalizer
public LongExternalizer(Class<T> targetClass, LongFunction<T> reader, ToLongFunction<T> writer)
-
-
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>
-
-