Class TableLocationMarkSweepHelper
java.lang.Object
io.deephaven.enterprise.tabledataservice.TableLocationMarkSweepHelper
An helper for
TableLocationProvider implementations that can mark and sweep table locations based on if they
have been visited in the current cycle.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal longGet the next mark value for marking locations.final voidsweepUnvisited(@NotNull AbstractTableLocationProvider provider, long markValue) Remove all locations that have not been visited after a call togetNextMark().final voidvisitLocationKey(@NotNull TableLocationKey key) Visit a specific location.
-
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 withsweepUnvisited(AbstractTableLocationProvider, long)to eliminate unvisited locations. -
visitLocationKey
Visit a specific location. This will track it with the most recent mark value.- Parameters:
key- the visitedTableLocationKey
-
sweepUnvisited
public final void sweepUnvisited(@NotNull @NotNull AbstractTableLocationProvider provider, long markValue) Remove all locations that have not been visited after a call togetNextMark(). All values that have not been visited since the provided mark will be removed from the provider.- Parameters:
provider- theTableLocationProviderto sweep from.markValue- the mark value to sweep from.
-