Class CompressionInfo
- java.lang.Object
-
- org.apache.cassandra.db.streaming.CompressionInfo
-
public abstract class CompressionInfo extends java.lang.ObjectContainer that carries compression parameters and chunks to decompress data from stream.
-
-
Field Summary
Fields Modifier and Type Field Description static IVersionedSerializer<CompressionInfo>serializer
-
Constructor Summary
Constructors Constructor Description CompressionInfo()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract CompressionMetadata.Chunk[]chunks()Returns the offset and length of the file chunks.booleanequals(java.lang.Object o)longgetTotalSize()Computes the size of the file to transfer.inthashCode()static CompressionInfonewInstance(CompressionMetadata.Chunk[] chunks, CompressionParams parameters)Create aCompressionInfoinstance which is fully initialized.abstract CompressionParamsparameters()Returns the compression parameters.
-
-
-
Field Detail
-
serializer
public static final IVersionedSerializer<CompressionInfo> serializer
-
-
Method Detail
-
parameters
public abstract CompressionParams parameters()
Returns the compression parameters.- Returns:
- the compression parameters.
-
chunks
public abstract CompressionMetadata.Chunk[] chunks()
Returns the offset and length of the file chunks.- Returns:
- the offset and length of the file chunks.
-
getTotalSize
public long getTotalSize()
Computes the size of the file to transfer.- Returns:
- the size of the file in bytes
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
newInstance
public static CompressionInfo newInstance(CompressionMetadata.Chunk[] chunks, CompressionParams parameters)
Create aCompressionInfoinstance which is fully initialized.- Parameters:
chunks- the file chunksparameters- the compression parameters
-
-