Class ArrayCell

All Implemented Interfaces:
IMeasurableMemory

public class ArrayCell extends AbstractCell<byte[]>
  • Constructor Details

    • ArrayCell

      public ArrayCell(ColumnMetadata column, long timestamp, int ttl, long localDeletionTime, byte[] value, CellPath path)
    • ArrayCell

      public ArrayCell(ColumnMetadata column, long timestamp, int ttl, int localDeletionTimeUnsignedInteger, byte[] value, CellPath path)
  • Method Details

    • timestamp

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

      Specified by:
      timestamp in class Cell<byte[]>
      Returns:
      the cell timestamp.
    • ttl

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

      public byte[] value()
      Specified by:
      value in class Cell<byte[]>
    • accessor

      public ValueAccessor<byte[]> accessor()
      Specified by:
      accessor in class Cell<byte[]>
    • 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<byte[]>
      Returns:
      the cell path for cells of complex column, and null for other cells.
    • withUpdatedColumn

      public Cell<?> withUpdatedColumn(ColumnMetadata newColumn)
      Specified by:
      withUpdatedColumn in class Cell<byte[]>
    • withUpdatedValue

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

      public Cell<?> withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, long newLocalDeletionTime)
      Specified by:
      withUpdatedTimestampAndLocalDeletionTime in class Cell<byte[]>
    • 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<byte[]>
      Returns:
      a cell with an empty buffer as value
    • clone

      public Cell<?> clone(ByteBufferCloner cloner)
      Overrides:
      clone in class AbstractCell<byte[]>
    • 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
    • localDeletionTimeAsUnsignedInt

      protected int localDeletionTimeAsUnsignedInt()
      Specified by:
      localDeletionTimeAsUnsignedInt in class Cell<byte[]>