Package org.apache.cassandra.io
Interface ISerializer<T>
-
- All Superinterfaces:
IGenericSerializer<T,DataInputPlus,DataOutputPlus>
- All Known Implementing Classes:
CommitLogPosition.CommitLogPositionSerializer
,DeletionTime.LegacySerializer
,DeletionTime.Serializer
,EstimatedHistogram.EstimatedHistogramSerializer
,IndexInfo.Serializer
,SerializingCacheProvider.RowCacheSerializer
,TombstoneHistogram.HistogramSerializer
,TombstoneHistogram.LegacyHistogramSerializer
public interface ISerializer<T> extends IGenericSerializer<T,DataInputPlus,DataOutputPlus>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
deserialize(DataInputPlus in)
Deserialize from the specified DataInput instance.void
serialize(T t, DataOutputPlus out)
Serialize the specified type into the specified DataOutput instance.long
serializedSize(T t)
default void
skip(DataInputPlus in)
-
-
-
Method Detail
-
serialize
void serialize(T t, DataOutputPlus out) throws java.io.IOException
Serialize the specified type into the specified DataOutput instance.- Specified by:
serialize
in interfaceIGenericSerializer<T,DataInputPlus,DataOutputPlus>
- Parameters:
t
- type that needs to be serializedout
- DataOutput into which serialization needs to happen.- Throws:
java.io.IOException
-
deserialize
T deserialize(DataInputPlus in) throws java.io.IOException
Deserialize from the specified DataInput instance.- Specified by:
deserialize
in interfaceIGenericSerializer<T,DataInputPlus,DataOutputPlus>
- Parameters:
in
- DataInput from which deserialization needs to happen.- Returns:
- the type that was deserialized
- Throws:
java.io.IOException
-
serializedSize
long serializedSize(T t)
- Specified by:
serializedSize
in interfaceIGenericSerializer<T,DataInputPlus,DataOutputPlus>
-
skip
default void skip(DataInputPlus in) throws java.io.IOException
- Throws:
java.io.IOException
-
-