org.apache.cassandra.io.util
Class SegmentedFile.Builder

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

public abstract static class SegmentedFile.Builder
extends java.lang.Object

Collects potential segmentation points in an underlying file, and builds a SegmentedFile to represent it.


Constructor Summary
SegmentedFile.Builder()
           
 
Method Summary
abstract  void addPotentialBoundary(long boundary)
          Adds a position that would be a safe place for a segment boundary in the file.
abstract  SegmentedFile complete(java.lang.String path)
          Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.
 void deserializeBounds(java.io.DataInput dis)
           
 void serializeBounds(java.io.DataOutput dos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SegmentedFile.Builder

public SegmentedFile.Builder()
Method Detail

addPotentialBoundary

public abstract void addPotentialBoundary(long boundary)
Adds a position that would be a safe place for a segment boundary in the file. For a block/row based file format, safe boundaries are block/row edges.

Parameters:
boundary - The absolute position of the potential boundary in the file.

complete

public abstract SegmentedFile complete(java.lang.String path)
Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.

Parameters:
path - The file on disk.

serializeBounds

public void serializeBounds(java.io.DataOutput dos)
                     throws java.io.IOException
Throws:
java.io.IOException

deserializeBounds

public void deserializeBounds(java.io.DataInput dis)
                       throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2012 The Apache Software Foundation