Class SSTableContext

All Implemented Interfaces:
AutoCloseable, SharedCloseable

public class SSTableContext extends SharedCloseableImpl
An SSTableContext is created for an individual sstable and is shared across column indexes to track per-sstable index files.

The SSTableContext will be released when receiving a sstable removed notification, but its shared copies in individual SSTableIndexes will be released when in-flight read requests complete.

  • Field Details

  • Method Details

    • create

      public static SSTableContext create(SSTableReader sstable)
    • sharedCopy

      public SSTableContext sharedCopy()
      Returns:
      a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.
    • newSSTableIndex

      public SSTableIndex newSSTableIndex(StorageAttachedIndex index)
      Returns a new SSTableIndex for a per-column index
    • descriptor

      public Descriptor descriptor()
      Returns:
      descriptor of attached sstable
    • diskUsage

      public long diskUsage()
      Returns:
      disk usage (in bytes) of per-sstable index files
    • openFilesPerSSTable

      public int openFilesPerSSTable()
      Returns:
      number of open files per SSTableContext instance
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object