Class Ballot.Serializer
- java.lang.Object
-
- org.apache.cassandra.serializers.TypeSerializer<T>
-
- org.apache.cassandra.utils.TimeUUID.AbstractSerializer<Ballot>
-
- org.apache.cassandra.service.paxos.Ballot.Serializer
-
- All Implemented Interfaces:
IVersionedAsymmetricSerializer<Ballot,Ballot>,IVersionedSerializer<Ballot>
- Enclosing class:
- Ballot
public static class Ballot.Serializer extends TimeUUID.AbstractSerializer<Ballot> implements IVersionedSerializer<Ballot>
-
-
Field Summary
Fields Modifier and Type Field Description static Ballot.Serializerinstance
-
Constructor Summary
Constructors Constructor Description Serializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Ballotdeserialize(DataInputPlus in, int version)Deserialize into the specified DataInputStream instance.<V> Ballotdeserialize(V value, ValueAccessor<V> accessor)java.lang.Class<Ballot>getType()voidserialize(Ballot t, DataOutputPlus out, int version)Serialize the specified type into the specified DataOutputStream instance.longserializedSize(Ballot t, int version)Calculate serialized size of object without actually serializing.-
Methods inherited from class org.apache.cassandra.utils.TimeUUID.AbstractSerializer
serialize, toString, validate
-
Methods inherited from class org.apache.cassandra.serializers.TypeSerializer
deserialize, toCQLLiteral, validate
-
-
-
-
Field Detail
-
instance
public static final Ballot.Serializer instance
-
-
Method Detail
-
deserialize
public <V> Ballot deserialize(V value, ValueAccessor<V> accessor)
- Specified by:
deserializein classTypeSerializer<Ballot>
-
getType
public java.lang.Class<Ballot> getType()
- Specified by:
getTypein classTypeSerializer<Ballot>
-
serialize
public void serialize(Ballot t, DataOutputPlus out, int version) throws java.io.IOException
Description copied from interface:IVersionedAsymmetricSerializerSerialize the specified type into the specified DataOutputStream instance.- Specified by:
serializein interfaceIVersionedAsymmetricSerializer<Ballot,Ballot>- Parameters:
t- type that needs to be serializedout- DataOutput into which serialization needs to happen.version- protocol version- Throws:
java.io.IOException- if serialization fails
-
deserialize
public Ballot deserialize(DataInputPlus in, int version) throws java.io.IOException
Description copied from interface:IVersionedAsymmetricSerializerDeserialize into the specified DataInputStream instance.- Specified by:
deserializein interfaceIVersionedAsymmetricSerializer<Ballot,Ballot>- Parameters:
in- DataInput from which deserialization needs to happen.version- protocol version- Returns:
- the type that was deserialized
- Throws:
java.io.IOException- if deserialization fails
-
serializedSize
public long serializedSize(Ballot t, int version)
Description copied from interface:IVersionedAsymmetricSerializerCalculate serialized size of object without actually serializing.- Specified by:
serializedSizein interfaceIVersionedAsymmetricSerializer<Ballot,Ballot>- Parameters:
t- object to calculate serialized sizeversion- protocol version- Returns:
- serialized size of object t
-
-