org.apache.cassandra.io.util

## Interface Rebufferer

All Superinterfaces:
  java.lang.AutoCloseable, ReaderFileProxy

All Known Implementing Classes:
  BufferManagingRebufferer, BufferManagingRebufferer.Aligned, BufferManagingRebufferer.Unaligned, LimitingRebufferer

    public interface Rebufferer
    extends ReaderFileProxy

Rebufferer for reading data by a RandomAccessReader.

### Nested Class Summary

Nested Classes
`static interface` `Rebufferer.BufferHolder`

### Field Summary

Fields
`static Rebufferer.BufferHolder` `EMPTY`

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `closeReader()` Called when a reader is closed.
`Rebufferer.BufferHolder` `rebuffer(long position)` Rebuffer (move on or seek to) a given position, and return a buffer that can be used there.

### Methods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy

`channel, close, fileLength, getCrcCheckChance`

### Field Detail

#### EMPTY

    static final Rebufferer.BufferHolder EMPTY

### Method Detail

#### rebuffer

    Rebufferer.BufferHolder rebuffer(long position)

Rebuffer (move on or seek to) a given position, and return a buffer that can be used there. The only guarantee about the size of the returned data is that unless rebuffering at the end of the file, the buffer will not be empty and will contain the requested position, i.e. `offset <= position < offset + bh.buffer().limit()`, but the buffer will not be positioned there.

#### closeReader

    void closeReader()

Called when a reader is closed. Should clean up reader-specific data.