Class TableUpdateImpl

java.lang.Object
io.deephaven.engine.table.impl.TableUpdateImpl
All Implemented Interfaces:
LogOutputAppendable, TableUpdate

public class TableUpdateImpl extends Object implements TableUpdate
Implementation of TableUpdate.
  • Field Details

  • Constructor Details

    • TableUpdateImpl

      public TableUpdateImpl()
    • TableUpdateImpl

      public TableUpdateImpl(RowSet added, RowSet removed, RowSet modified, RowSetShiftData shifted, ModifiedColumnSet modifiedColumnSet)
      Construct a TableUpdateImpl, which takes ownership of the passed in RowSets.

      The added, removed, and modified RowSets must be distinct.

      Parameters:
      added - The added rows (in post-shift space)
      removed - The removed rows (in pre-shift space)
      modified - The modified rows (in post-shift space)
      shifted - The shifted rows
      modifiedColumnSet - The modified columns
  • Method Details

    • toString

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

      public void validate() throws AssertionFailure
      Description copied from interface: TableUpdate
      Throws an AssertionFailure if this update is not structurally valid, i.e. its accessors will return non-null, usable data structures. This does not test for usage outside the appropriate updating phase.
      Specified by:
      validate in interface TableUpdate
      Throws:
      AssertionFailure
    • acquire

      public TableUpdateImpl acquire()
      Description copied from interface: TableUpdate
      Acquire a reference count for this TableUpdate that will keep it from being cleaned up until it is released. Code that calls this method must be sure to call TableUpdate.release() when the TableUpdate is no longer needed. Acquiring a TableUpdate does not change the constraint that it must not be used outside the updating phase for which it was created.
      Specified by:
      acquire in interface TableUpdate
      Returns:
      this for convenience
    • release

      public void release()
      Description copied from interface: TableUpdate
      Release a previously-acquired reference count for this object.
      Specified by:
      release in interface TableUpdate
    • getModifiedPreShift

      @NotNull public @NotNull RowSet getModifiedPreShift()
      Specified by:
      getModifiedPreShift in interface TableUpdate
      Returns:
      a cached copy of the modified RowSet in pre-shift keyspace
    • reset

      public void reset()
    • copy

      public static TableUpdateImpl copy(@NotNull @NotNull TableUpdate tableUpdate)
      Make a deep copy of a TableUpdate.
    • copy

      public static TableUpdateImpl copy(@NotNull @NotNull TableUpdate tableUpdate, @NotNull @NotNull ModifiedColumnSet mcs)
      Make a deep copy of a TableUpdate with the given mcs.
    • added

      @NotNull public @NotNull RowSet added()
      Description copied from interface: TableUpdate
      Rows added (in post-shift keyspace).

      A TableUpdate.validate() update never returns a null RowSet, but the returned RowSet may be empty.

      Note that the TableUpdate object still retains ownership of the returned RowSet object. The caller must not close the returned RowSet. To use the RowSet beyond the scope of a notification, the caller must acquire the update or make a copy of the RowSet.

      Specified by:
      added in interface TableUpdate
    • removed

      @NotNull public @NotNull RowSet removed()
      Description copied from interface: TableUpdate
      Rows removed (in pre-shift keyspace).

      A TableUpdate.validate() update never returns a null RowSet, but the returned RowSet may be empty.

      Note that the TableUpdate object still retains ownership of the returned RowSet object. The caller must not close the returned RowSet. To use the RowSet beyond the scope of a notification, the caller must acquire the update or make a copy of the RowSet.

      Specified by:
      removed in interface TableUpdate
    • modified

      @NotNull public @NotNull RowSet modified()
      Description copied from interface: TableUpdate
      Rows modified (in post-shift keyspace).

      A TableUpdate.validate() update never returns a null RowSet, but the returned RowSet may be empty.

      Note that the TableUpdate object still retains ownership of the returned RowSet object. The caller must not close the returned RowSet. To use the RowSet beyond the scope of a notification, the caller must acquire the update or make a copy of the RowSet.

      Specified by:
      modified in interface TableUpdate
    • shifted

      @NotNull public @NotNull RowSetShiftData shifted()
      Description copied from interface: TableUpdate
      Rows that shifted to new row keys.
      Specified by:
      shifted in interface TableUpdate
    • modifiedColumnSet

      @NotNull public @NotNull ModifiedColumnSet modifiedColumnSet()
      Description copied from interface: TableUpdate
      The set of columns that might have changed for rows in the TableUpdate.modified() RowSet.
      Specified by:
      modifiedColumnSet in interface TableUpdate