org.apache.cassandra.io.compress
Class CompressionMetadata

java.lang.Object
  extended by org.apache.cassandra.io.compress.CompressionMetadata

public class CompressionMetadata
extends java.lang.Object

Holds metadata about compressed file


Nested Class Summary
 class CompressionMetadata.Chunk
          Holds offset and length of the file chunk
static class CompressionMetadata.Writer
           
 
Field Summary
 long[] chunkOffsets
           
 long compressedFileLength
           
 long dataLength
           
 java.lang.String indexFilePath
           
 CompressionParameters parameters
           
 
Constructor Summary
CompressionMetadata(java.lang.String indexFilePath, long compressedLength)
           
 
Method Summary
 CompressionMetadata.Chunk chunkFor(long position)
          Get a chunk of compressed data (offset, length) corresponding to given position
 int chunkLength()
           
 ICompressor compressor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataLength

public final long dataLength

compressedFileLength

public final long compressedFileLength

chunkOffsets

public final long[] chunkOffsets

indexFilePath

public final java.lang.String indexFilePath

parameters

public final CompressionParameters parameters
Constructor Detail

CompressionMetadata

public CompressionMetadata(java.lang.String indexFilePath,
                           long compressedLength)
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

compressor

public ICompressor compressor()

chunkLength

public int chunkLength()

chunkFor

public CompressionMetadata.Chunk chunkFor(long position)
                                   throws java.io.IOException
Get a chunk of compressed data (offset, length) corresponding to given position

Parameters:
position - Position in the file.
Returns:
pair of chunk offset and length.
Throws:
java.io.IOException - on any I/O error.


Copyright © 2011 The Apache Software Foundation