@Public public interface CopyableValue<T> extends Value
| Modifier and Type | Method and Description |
|---|---|
T |
copy()
Performs a deep copy of this object into a new instance.
|
void |
copy(DataInputView source,
DataOutputView target)
Copies the next serialized instance from
source to target. |
void |
copyTo(T target)
Performs a deep copy of this object into the
target instance. |
int |
getBinaryLength()
Gets the length of the data type when it is serialized, in bytes.
|
read, writeint getBinaryLength()
-1, if variable length.void copyTo(T target)
target instance.target - Object to copy into.T copy()
CopyableValue when storing multiple objects. With object reuse
a deep copy must be created and type erasure prevents calling new.void copy(DataInputView source, DataOutputView target) throws IOException
source to target.
This method is equivalent to calling IOReadableWritable.read(DataInputView)
followed by IOReadableWritable.write(DataOutputView) but does not require
intermediate deserialization.source - Data source for serialized instance.target - Data target for serialized instance.IOExceptionIOReadableWritableCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.