Package com.illumon.iris.db.v2.utils
Class HashSetBackedTableFactory
java.lang.Object
com.illumon.iris.db.v2.utils.HashSetBackedTableFactory
An abstract table that represents a hashset of smart keys. Since we are representing a set, there we are not defining
an order to our output. Whatever order the table happens to end up in, is fine.
The table will refresh by regenerating the full hashset (using the setGenerator Function passed in); and then
comparing that to the existing hash set.
-
Method Summary
-
Method Details
-
create
public static Table create(com.fishlib.base.Function.Nullary<HashSet<com.fishlib.datastructures.util.SmartKey>> setGenerator, int refreshIntervalMs, String... colNames) Create a ticking table based on a setGenerator.- Parameters:
setGenerator
- a function that returns a HashSet of SmartKeys, each SmartKey is a row in the output.refreshIntervalMs
- how often to refresh the table, if less than or equal to 0 the table does not tick.colNames
- the column names for the output table, must match the number of elements in each SmartKey.- Returns:
- a table representing the Set returned by the setGenerator
-