Class Tables

java.lang.Object
net.quasardb.qdb.ts.Tables
All Implemented Interfaces:
Serializable

public class Tables extends Object implements Serializable
Utility class to make working with multiple tables easier by bridging between the #Table and #Writer class. It maintains its own internal array of tables and can be serialized.
See Also:
  • Field Details

  • Constructor Details

    • Tables

      public Tables()
      Initialize empty collection of Tables.
    • Tables

      public Tables(Table[] tables)
      Initialize a collection of timeseries Tables.
      Parameters:
      tables - Initial collection.
  • Method Details

    • size

      public int size()
      Returns the number of tables in this collection.
      Returns:
      The number of tables in this collection.
    • hasTableWithName

      public boolean hasTableWithName(String tableName)
      Returns true when the collection contains a table with a certain name. This operation has O(N) complexity.
      Parameters:
      tableName - The tablename to search for.
      Returns:
      True when the collection contains a table with the name.
    • getTables

      protected Table[] getTables()
      Provides access to the internal #Table collection.
    • add

      public Tables add(Table table)
      Returns a copy of this collection with the new table added.
      Parameters:
      table - The table to add
    • add

      public Tables add(Session session, String name)
      Returns a copy of this collection with the new table added.
      Parameters:
      session - Active session wit the QuasarDB cluster.
      name - Name of the table to add
    • ofTag

      public static Tables ofTag(Session session, String tag)
      Looks up many tables by tag.
    • toString

      public String toString()
      Overrides:
      toString in class Object