Class MappedSerializer<T,V>
java.lang.Object
org.wildfly.clustering.marshalling.MappedSerializer<T,V>
- Type Parameters:
T- the target typeV- the mapped type
- All Implemented Interfaces:
Serializer<T>
A serializer that delegates to the serializer of a mapped value.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionMappedSerializer(Serializer<V> serializer, Function<T, V> accessor, Function<V, T> factory) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.clustering.marshalling.Serializer
size
-
Constructor Details
-
MappedSerializer
-
-
Method Details
-
write
Description copied from interface:SerializerWrites the specified object to the specified output stream- Specified by:
writein interfaceSerializer<T>- Parameters:
output- the data output streamvalue- an object to serialize- Throws:
IOException- if an I/O error occurs
-
read
Description copied from interface:SerializerReads an object from the specified input stream.- Specified by:
readin interfaceSerializer<T>- Parameters:
input- a data input stream- Returns:
- the deserialized object
- Throws:
IOException- if an I/O error occurs
-