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 long
Get the next mark value for marking locations.final void
sweepUnvisited
(@NotNull AbstractTableLocationProvider provider, long markValue) Remove all locations that have not been visited after a call togetNextMark()
.final void
visitLocationKey
(@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
- theTableLocationProvider
to sweep from.markValue
- the mark value to sweep from.
-