public class NonReusingDeserializationDelegate<T> extends Object implements DeserializationDelegate<T>
DeserializationDelegate
that always creates a new instance upon deserialization.Constructor and Description |
---|
NonReusingDeserializationDelegate(TypeSerializer<T> serializer) |
Modifier and Type | Method and 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.
|
public NonReusingDeserializationDelegate(TypeSerializer<T> serializer)
public void setInstance(T instance)
setInstance
in interface DeserializationDelegate<T>
public T getInstance()
getInstance
in interface DeserializationDelegate<T>
public void write(DataOutputView out) throws IOException
IOReadableWritable
write
in interface IOReadableWritable
out
- the output view to receive the data.IOException
- thrown if any error occurs while writing to the output streampublic void read(DataInputView in) throws IOException
IOReadableWritable
read
in interface IOReadableWritable
in
- the input view to read the data fromIOException
- thrown if any error occurs while reading from the input streamCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.