SegmentedFile.Builder (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.io.util

## Class SegmentedFile.Builder

- java.lang.Object
- - org.apache.cassandra.io.util.SegmentedFile.Builder

- Direct Known Subclasses:
    BufferedPoolingSegmentedFile.Builder, 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

    Constructors
    Constructor and Description
    `SegmentedFile.Builder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 in)`
    `abstract SegmentedFile` | `openEarly(java.lang.String path)` Called after all potential boundaries have been added to apply this Builder to a concrete file on disk.
    `void` | `serializeBounds(java.io.DataOutput out)`

    - ### 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.

    - #### openEarly

          public abstract SegmentedFile openEarly(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 out)
                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### deserializeBounds

          public void deserializeBounds(java.io.DataInput in)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

Copyright © 2014 The Apache Software Foundation