Class SerializationDelegate<T>
- java.lang.Object
-
- org.apache.flink.runtime.plugable.SerializationDelegate<T>
-
- Type Parameters:
T
- The type to be represented as an IOReadableWritable.
- All Implemented Interfaces:
IOReadableWritable
public class SerializationDelegate<T> extends Object implements IOReadableWritable
The serialization delegate exposes an arbitrary element as aIOReadableWritable
for serialization, with the help of a type serializer.
-
-
Constructor Summary
Constructors Constructor Description SerializationDelegate(TypeSerializer<T> serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getInstance()
void
read(DataInputView in)
Reads the object's internal data from the given data input view.void
setInstance(T instance)
void
write(DataOutputView out)
Writes the object's internal data to the given data output view.
-
-
-
Constructor Detail
-
SerializationDelegate
public SerializationDelegate(TypeSerializer<T> serializer)
-
-
Method Detail
-
setInstance
public void setInstance(T instance)
-
getInstance
public T getInstance()
-
write
public void write(DataOutputView out) throws IOException
Description copied from interface:IOReadableWritable
Writes the object's internal data to the given data output view.- Specified by:
write
in interfaceIOReadableWritable
- Parameters:
out
- the output view to receive the data.- Throws:
IOException
- thrown if any error occurs while writing to the output stream
-
read
public void read(DataInputView in) throws IOException
Description copied from interface:IOReadableWritable
Reads the object's internal data from the given data input view.- Specified by:
read
in interfaceIOReadableWritable
- Parameters:
in
- the input view to read the data from- Throws:
IOException
- thrown if any error occurs while reading from the input stream
-
-