public static final class Batch.Serializer extends java.lang.Object implements IVersionedSerializer<Batch>
Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
Batch |
deserialize(DataInputPlus in,
int version)
Deserialize into the specified DataInputStream instance.
|
void |
serialize(Batch batch,
DataOutputPlus out,
int version)
Serialize the specified type into the specified DataOutputStream instance.
|
long |
serializedSize(Batch batch,
int version)
Calculate serialized size of object without actually serializing.
|
public long serializedSize(Batch batch, int version)
IVersionedAsymmetricSerializer
serializedSize
in interface IVersionedAsymmetricSerializer<Batch,Batch>
batch
- object to calculate serialized sizeversion
- protocol versionpublic void serialize(Batch batch, DataOutputPlus out, int version) throws java.io.IOException
IVersionedAsymmetricSerializer
serialize
in interface IVersionedAsymmetricSerializer<Batch,Batch>
batch
- type that needs to be serializedout
- DataOutput into which serialization needs to happen.version
- protocol versionjava.io.IOException
- if serialization failspublic Batch deserialize(DataInputPlus in, int version) throws java.io.IOException
IVersionedAsymmetricSerializer
deserialize
in interface IVersionedAsymmetricSerializer<Batch,Batch>
in
- DataInput from which deserialization needs to happen.version
- protocol versionjava.io.IOException
- if deserialization failsCopyright © 2009- The Apache Software Foundation