Class TableLocationMarkSweepHelper

java.lang.Object
io.deephaven.enterprise.tabledataservice.TableLocationMarkSweepHelper

public class TableLocationMarkSweepHelper extends Object
An helper for TableLocationProvider implementations that can mark and sweep table locations based on if they have been visited in the current cycle.
  • Constructor Details

    • TableLocationMarkSweepHelper

      public TableLocationMarkSweepHelper()
  • Method Details

    • getNextMark

      public final long getNextMark()
      Get the next mark value for marking locations. Use the returned value in conjunction with sweepUnvisited(AbstractTableLocationProvider, long) to eliminate unvisited locations.
    • visitLocationKey

      public final void visitLocationKey(@NotNull @NotNull TableLocationKey key)
      Visit a specific location. This will track it with the most recent mark value.
      Parameters:
      key - the visited TableLocationKey
    • sweepUnvisited

      public final void sweepUnvisited(@NotNull @NotNull AbstractTableLocationProvider provider, long markValue)
      Remove all locations that have not been visited after a call to getNextMark(). All values that have not been visited since the provided mark will be removed from the provider.
      Parameters:
      provider - the TableLocationProvider to sweep from.
      markValue - the mark value to sweep from.