org.apache.cassandra.io.util
Class PoolingSegmentedFile

java.lang.Object
  extended by org.apache.cassandra.io.util.SegmentedFile
      extended by org.apache.cassandra.io.util.PoolingSegmentedFile
Direct Known Subclasses:
BufferedSegmentedFile, CompressedSegmentedFile

public abstract class PoolingSegmentedFile
extends SegmentedFile


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.cassandra.io.util.SegmentedFile
SegmentedFile.Builder
 
Field Summary
 java.util.Queue<RandomAccessReader> pool
           
 
Fields inherited from class org.apache.cassandra.io.util.SegmentedFile
length, onDiskLength, path
 
Constructor Summary
protected PoolingSegmentedFile(java.lang.String path, long length)
           
protected PoolingSegmentedFile(java.lang.String path, long length, long onDiskLength)
           
 
Method Summary
 void cleanup()
          Do whatever action is needed to reclaim ressources used by this SegmentedFile.
protected abstract  RandomAccessReader createReader(java.lang.String path)
           
 FileDataInput getSegment(long position)
           
 void recycle(RandomAccessReader reader)
           
 
Methods inherited from class org.apache.cassandra.io.util.SegmentedFile
getBuilder, getCompressedBuilder, iterator, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pool

public final java.util.Queue<RandomAccessReader> pool
Constructor Detail

PoolingSegmentedFile

protected PoolingSegmentedFile(java.lang.String path,
                               long length)

PoolingSegmentedFile

protected PoolingSegmentedFile(java.lang.String path,
                               long length,
                               long onDiskLength)
Method Detail

getSegment

public FileDataInput getSegment(long position)
Specified by:
getSegment in class SegmentedFile

createReader

protected abstract RandomAccessReader createReader(java.lang.String path)

recycle

public void recycle(RandomAccessReader reader)

cleanup

public void cleanup()
Description copied from class: SegmentedFile
Do whatever action is needed to reclaim ressources used by this SegmentedFile.

Specified by:
cleanup in class SegmentedFile


Copyright © 2013 The Apache Software Foundation