Class EmptyRebufferer

java.lang.Object
org.apache.cassandra.io.util.EmptyRebufferer
All Implemented Interfaces:
AutoCloseable, ReaderFileProxy, Rebufferer, RebuffererFactory

public class EmptyRebufferer extends Object implements Rebufferer, RebuffererFactory
  • Constructor Details

    • EmptyRebufferer

      public EmptyRebufferer(ChannelProxy channel)
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface ReaderFileProxy
    • channel

      public ChannelProxy channel()
      Specified by:
      channel in interface ReaderFileProxy
    • fileLength

      public long fileLength()
      Specified by:
      fileLength in interface ReaderFileProxy
    • getCrcCheckChance

      public double getCrcCheckChance()
      Description copied from interface: ReaderFileProxy
      Needed for tests. Returns the table's CRC check chance, which is only set for compressed tables.
      Specified by:
      getCrcCheckChance in interface ReaderFileProxy
    • rebuffer

      public Rebufferer.BufferHolder rebuffer(long position)
      Description copied from interface: Rebufferer
      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.
      Specified by:
      rebuffer in interface Rebufferer
    • closeReader

      public void closeReader()
      Description copied from interface: Rebufferer
      Called when a reader is closed. Should clean up reader-specific data.
      Specified by:
      closeReader in interface Rebufferer
    • instantiateRebufferer

      public Rebufferer instantiateRebufferer(boolean isScan)
      Specified by:
      instantiateRebufferer in interface RebuffererFactory