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 Type
    Method
    Description
    io.deephaven.shadow.enterprise.com.illumon.iris.db.util.config.tools.Result
    computeResult(@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 boolean
    hasNamespace(@NotNull Database db, @NotNull String namespace)
    Whether a database contains a namespace.
    static boolean
    hasTable(@NotNull Database db, @NotNull String namespace, @NotNull String tableName)
    Whether a database contains a table.
    boolean
    isValidTarget(@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 void
    runAll(@NotNull Database db)
    Execute Core+ input table tool against all user tables.
    default void
    runByNamespace(@NotNull Database db, @NotNull String... namespaces)
    Execute Core+ input table tool by specifying namespaces.
    default void
    runByTableName(@NotNull Database db, @NotNull String namespace, @NotNull String... tableNames)
    Execute Core+ input table tool by specifying namespace and table names.
  • Method Details

    • hasNamespace

      static boolean hasNamespace(@NotNull @NotNull Database db, @NotNull @NotNull String namespace)
      Whether a database contains a namespace.
      Parameters:
      db - the database to check against
      namespace - 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 against
      namespace - namespace of table
      tableName - table name of table
      Returns:
      true if the database contains the table; false otherwise
    • runByNamespace

      default void runByNamespace(@NotNull @NotNull Database db, @NotNull @NotNull String... namespaces)
      Execute Core+ input table tool by specifying namespaces.
      Parameters:
      db - database to retrieve input tables
      namespaces - 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 tables
      namespace - namespace to execute
      tableNames - table names to execute
    • runAll

      default void runAll(@NotNull @NotNull Database db)
      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 tables
      target - 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 reporting
      db - database to retrieve input tables
      targets - input table targets
      Returns:
      the Result of the execution