Interface InputTableTool
- All Known Implementing Classes:
InputTableSnapshotter
public interface InputTableTool
Handles the targeting and reporting of Core+ executions on multiple input tables.
-
Method Summary
Modifier and TypeMethodDescriptionio.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.ResultcomputeResult(@NotNull io.deephaven.shadow.enterprise.com.fishlib.io.logger.Logger log, @NotNull Database db, @NotNull List<io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.InputTableNameTarget> targets) Main input table tool logic, e.g.static booleanhasNamespace(@NotNull Database db, @NotNull String namespace) Whether a database contains a namespace.static booleanWhether a database contains a table.booleanisValidTarget(@NotNull Database db, @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.InputTableNameTarget target) Determines whether input table target is valid and should be executed.default voidExecute Core+ input table tool against all user tables.default voidrunByNamespace(@NotNull Database db, @NotNull String... namespaces) Execute Core+ input table tool by specifying namespaces.default voidrunByTableName(@NotNull Database db, @NotNull String namespace, @NotNull String... tableNames) Execute Core+ input table tool by specifying namespace and table names.
-
Method Details
-
hasNamespace
Whether a database contains a namespace.- Parameters:
db- the database to check againstnamespace- namespace of table- Returns:
- true if the database contains the namespace; false otherwise
-
hasTable
static boolean hasTable(@NotNull @NotNull Database db, @NotNull @NotNull String namespace, @NotNull @NotNull String tableName) Whether a database contains a table.- Parameters:
db- the database to check againstnamespace- namespace of tabletableName- table name of table- Returns:
- true if the database contains the table; false otherwise
-
runByNamespace
Execute Core+ input table tool by specifying namespaces.- Parameters:
db- database to retrieve input tablesnamespaces- namespaces to execute
-
runByTableName
default void runByTableName(@NotNull @NotNull Database db, @NotNull @NotNull String namespace, @NotNull @NotNull String... tableNames) Execute Core+ input table tool by specifying namespace and table names.- Parameters:
db- database to retrieve input tablesnamespace- namespace to executetableNames- table names to execute
-
runAll
Execute Core+ input table tool against all user tables. Note that there will be additional filtering logic to narrow down targets further.- Parameters:
db- database to retrieve input tables
-
isValidTarget
boolean isValidTarget(@NotNull @NotNull Database db, @NotNull @NotNull io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.InputTableNameTarget target) Determines whether input table target is valid and should be executed.- Parameters:
db- database to retrieve input tablestarget- input table target- Returns:
- true if input table target is valid; false if not
-
computeResult
io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.Result computeResult(@NotNull @NotNull io.deephaven.shadow.enterprise.com.fishlib.io.logger.Logger log, @NotNull @NotNull Database db, @NotNull @NotNull List<io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.InputTableNameTarget> targets) Main input table tool logic, e.g. snapshotting or converting.- Parameters:
log- logger for reportingdb- database to retrieve input tablestargets- input table targets- Returns:
- the
Resultof the execution
-