Class NativeCell

All Implemented Interfaces:
IMeasurableMemory

public class NativeCell extends AbstractCell<ByteBuffer>
  • Constructor Details

  • Method Details

    • timestamp

      public long timestamp()
      Description copied from class: Cell
      The cell timestamp.

      Specified by:
      timestamp in class Cell<ByteBuffer>
      Returns:
      the cell timestamp.
    • ttl

      public int ttl()
      Description copied from class: Cell
      The cell ttl.
      Specified by:
      ttl in class Cell<ByteBuffer>
      Returns:
      the cell ttl, or NO_TTL if the cell isn't an expiring one.
    • value

      public ByteBuffer value()
      Specified by:
      value in class Cell<ByteBuffer>
    • accessor

      public ValueAccessor<ByteBuffer> accessor()
      Specified by:
      accessor in class Cell<ByteBuffer>
    • valueSize

      public int valueSize()
      Overrides:
      valueSize in class Cell<ByteBuffer>
    • path

      public CellPath path()
      Description copied from class: Cell
      For cells belonging to complex types (non-frozen collection and UDT), the path to the cell.
      Specified by:
      path in class Cell<ByteBuffer>
      Returns:
      the cell path for cells of complex column, and null for other cells.
    • withUpdatedValue

      public Cell<?> withUpdatedValue(ByteBuffer newValue)
      Specified by:
      withUpdatedValue in class Cell<ByteBuffer>
    • withUpdatedTimestampAndLocalDeletionTime

      public Cell<?> withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, long newLocalDeletionTime)
      Specified by:
      withUpdatedTimestampAndLocalDeletionTime in class Cell<ByteBuffer>
    • withUpdatedColumn

      public Cell<?> withUpdatedColumn(ColumnMetadata column)
      Specified by:
      withUpdatedColumn in class Cell<ByteBuffer>
    • withSkippedValue

      public Cell withSkippedValue()
      Description copied from class: Cell
      Used to apply the same optimization as in Cell.Serializer.deserialize(org.apache.cassandra.io.util.DataInputPlus, org.apache.cassandra.db.LivenessInfo, org.apache.cassandra.schema.ColumnMetadata, org.apache.cassandra.db.SerializationHeader, org.apache.cassandra.db.rows.DeserializationHelper, org.apache.cassandra.db.marshal.ValueAccessor<V>) when the column is not queried but eventhough it's used for digest calculation.
      Specified by:
      withSkippedValue in class Cell<ByteBuffer>
      Returns:
      a cell with an empty buffer as value
    • unsharedHeapSize

      public long unsharedHeapSize()
      Specified by:
      unsharedHeapSize in interface IMeasurableMemory
      Specified by:
      unsharedHeapSize in class ColumnData
      Returns:
      the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.
    • unsharedHeapSizeExcludingData

      public long unsharedHeapSizeExcludingData()
      Specified by:
      unsharedHeapSizeExcludingData in class ColumnData
    • offHeapSize

      public long offHeapSize()
    • localDeletionTimeAsUnsignedInt

      protected int localDeletionTimeAsUnsignedInt()
      Specified by:
      localDeletionTimeAsUnsignedInt in class Cell<ByteBuffer>