public static final class InetAddressAndPort.Serializer extends java.lang.Object implements IVersionedSerializer<InetAddressAndPort>
Modifier and Type | Field and Description |
---|---|
static InetAddressAndPort.Serializer |
inetAddressAndPortSerializer |
static int |
MAXIMUM_SIZE |
Modifier and Type | Method and Description |
---|---|
InetAddressAndPort |
deserialize(DataInputPlus in,
int version)
Deserialize into the specified DataInputStream instance.
|
InetAddressAndPort |
extract(java.nio.ByteBuffer buf,
int position)
Extract
InetAddressAndPort from the provided ByteBuffer without altering its state. |
void |
serialize(InetAddressAndPort endpoint,
DataOutputPlus out,
int version)
Serialize the specified type into the specified DataOutputStream instance.
|
long |
serializedSize(InetAddressAndPort from,
int version)
Calculate serialized size of object without actually serializing.
|
public static final int MAXIMUM_SIZE
public static final InetAddressAndPort.Serializer inetAddressAndPortSerializer
public void serialize(InetAddressAndPort endpoint, DataOutputPlus out, int version) throws java.io.IOException
IVersionedAsymmetricSerializer
serialize
in interface IVersionedAsymmetricSerializer<InetAddressAndPort,InetAddressAndPort>
endpoint
- type that needs to be serializedout
- DataOutput into which serialization needs to happen.version
- protocol versionjava.io.IOException
- if serialization failspublic InetAddressAndPort deserialize(DataInputPlus in, int version) throws java.io.IOException
IVersionedAsymmetricSerializer
deserialize
in interface IVersionedAsymmetricSerializer<InetAddressAndPort,InetAddressAndPort>
in
- DataInput from which deserialization needs to happen.version
- protocol versionjava.io.IOException
- if deserialization failspublic InetAddressAndPort extract(java.nio.ByteBuffer buf, int position) throws java.io.IOException
InetAddressAndPort
from the provided ByteBuffer
without altering its state.java.io.IOException
public long serializedSize(InetAddressAndPort from, int version)
IVersionedAsymmetricSerializer
serializedSize
in interface IVersionedAsymmetricSerializer<InetAddressAndPort,InetAddressAndPort>
from
- object to calculate serialized sizeversion
- protocol versionCopyright © 2009- The Apache Software Foundation