Class SortedClockFilter

All Implemented Interfaces:
Expression, Filter, LogOutputAppendable, LivenessManager, LivenessNode, LivenessReferent, ReindexingFilter, WhereFilter, NotificationQueue.Dependency, Serializable, Runnable

public class SortedClockFilter extends ClockFilter
This will filter a table on an Instant column for all rows greater than "now" according to a supplied clock. It requires sorting of the input table according to the specified timestamp column, leveraging this for a very efficient implementation (albeit one that requires sorting first) and an output sequence that is monotonically nondecreasing in the specified column.
See Also:
  • Constructor Details

    • SortedClockFilter

      public SortedClockFilter(@NotNull @NotNull String columnName, @NotNull @NotNull Clock clock, boolean refreshing)
  • Method Details

    • copy

      public SortedClockFilter copy()
      Description copied from interface: WhereFilter
      Create a copy of this WhereFilter.
      Returns:
      an independent copy of this WhereFilter.
    • requiresSorting

      public boolean requiresSorting()
      Returns:
      True iff getSortColumns will return a non-null, non-empty array of column names to sort on.
    • getSortColumns

      public String[] getSortColumns()
      Description copied from interface: ReindexingFilter
      Get the columns on which the input table should be sorted before filtering.
      Returns:
      Columns to sort on, or null if there are no such columns
    • sortingDone

      public void sortingDone()
      Description copied from interface: ReindexingFilter
      Advise this filter that sorting has been performed. requiresSorting must return false hereafter.
    • initializeAndGetInitialIndex

      @Nullable protected @Nullable WritableRowSet initializeAndGetInitialIndex(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table)
      Specified by:
      initializeAndGetInitialIndex in class ClockFilter
    • updateAndGetAddedIndex

      @Nullable protected @Nullable WritableRowSet updateAndGetAddedIndex()
      Specified by:
      updateAndGetAddedIndex in class ClockFilter
    • permitParallelization

      public boolean permitParallelization()
      Returns:
      if this filter can be applied in parallel