Class UnsortedClockFilter

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

public class UnsortedClockFilter extends ClockFilter
This will filter a table on an Instant column for all rows greater than "now" according to a supplied clock. It does not require any pre-sorting of the input table, instead preserving relative order in the initial output and each subsequent run. Relative to SortedClockFilter, this implementation may require less overall storage and do less overall work for tables with relatively few monotonically nondecreasing ranges (that is, m (number of ranges) <<< n (size in rows)), but it will do more work on run().
See Also:
  • Constructor Details

    • UnsortedClockFilter

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

    • 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.
    • copy

      public UnsortedClockFilter copy()
      Description copied from interface: WhereFilter
      Create a copy of this WhereFilter.
      Returns:
      an independent copy of this WhereFilter.
    • 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