public class Table extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Column[] |
columns |
protected String |
name |
Constructor and Description |
---|
Table(Session session,
String name)
Initialize a new timeseries table.
|
Modifier and Type | Method and Description |
---|---|
static AutoFlushWriter |
asyncAutoFlushWriter(Session session,
String name)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
asyncAutoFlushWriter(Session session,
String name,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
asyncAutoFlushWriter(Session session,
Table table)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
asyncAutoFlushWriter(Session session,
Table table,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static Writer |
asyncWriter(Session session,
String name)
Initializes new writer for a single timeseries table using
high-speed buffered writes.
|
static Writer |
asyncWriter(Session session,
Table table)
Initializes new writer for a timeseries table using high-speed
buffered writes.
|
static void |
attachTag(Session session,
String tableName,
String tag)
Attaches a tag to an existing table.
|
static void |
attachTag(Session session,
Table table,
String tag)
Attaches a tag to an existing table.
|
static void |
attachTags(Session session,
String tableName,
List<String> tags)
Attaches tags to an existing table.
|
static void |
attachTags(Session session,
Table table,
List<String> tags)
Attaches tags to an existing table.
|
static AutoFlushWriter |
autoFlushWriter(Session session,
String name)
Initializes new writer for a timeseries table that periodically flushes
its local cache.
|
static AutoFlushWriter |
autoFlushWriter(Session session,
String name,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache.
|
static AutoFlushWriter |
autoFlushWriter(Session session,
Table table)
Initializes new writer for a timeseries table that periodically flushes
its local cache.
|
static AutoFlushWriter |
autoFlushWriter(Session session,
Table table,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache.
|
int |
columnIndexById(String id)
Utility function that looks up a column's index by its id.
|
static Table |
create(Session session,
String name,
Column[] columns)
Create new timeseries table with a default shard size.
|
static Table |
create(Session session,
String name,
Column[] columns,
long shardSize)
Create new timeseries table.
|
static Table |
create(Session session,
String name,
Table skeleton)
Create new timeseries table by copying a 'skeleton' table's schema and using
the default shard size.
|
static Table |
create(Session session,
String name,
Table skeleton,
long shardSize)
Create new timeseries table by copying a 'skeleton' table's schema.
|
static AutoFlushWriter |
fastAutoFlushWriter(Session session,
String name)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
fastAutoFlushWriter(Session session,
String name,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
fastAutoFlushWriter(Session session,
Table table)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static AutoFlushWriter |
fastAutoFlushWriter(Session session,
Table table,
long threshold)
Initializes new writer for a timeseries table that periodically flushes
its local cache, and makes use of high-speed buffered writes.
|
static Writer |
fastWriter(Session session,
String name)
Initializes new writer for a single table that makes use of
in-place updates rather than copy-on-write.
|
static Writer |
fastWriter(Session session,
Table table)
Initializes new writer for a single table that makes use of
in-place updates rather than copy-on-write.
|
Column[] |
getColumns()
Returns column representation of this table.
|
String |
getName()
Returns the timeseries table name.
|
static Reader |
reader(Session session,
String name,
TimeRange[] ranges)
Initializes new reader for a timeseries table.
|
static Reader |
reader(Session session,
Table table,
TimeRange[] ranges)
Initializes new reader for a timeseries table.
|
static void |
remove(Session session,
String name)
Remove existing timeseries table.
|
String |
toString() |
static Writer |
truncateWriter(Session session,
String name)
Initializes new writer for a single table that replaces any
existing data with the new data, rather than just adding.
|
static Writer |
truncateWriter(Session session,
Table table)
Initializes new writer for a single table that replaces any
existing data with the new data, rather than just adding.
|
static Writer |
writer(Session session,
String name)
Initializes new writer for a single timeseries table.
|
static Writer |
writer(Session session,
Table table)
Initializes new writer for a timeseries table.
|
public static Table create(Session session, String name, Table skeleton)
session
- Active session with the QuasarDB cluster.name
- Unique identifier for this timeseries table.skeleton
- Skeleton table's schema to be copied.public static Table create(Session session, String name, Table skeleton, long shardSize)
session
- Active session with the QuasarDB cluster.name
- Unique identifier for this timeseries table.skeleton
- Skeleton table's schema to be copied.shardSize
- The size of the shards in ms.public static Table create(Session session, String name, Column[] columns)
session
- Active session with the QuasarDB cluster.name
- Unique identifier for this timeseries table.columns
- Column definitions of this table. The ordering of the array will persist
through the table definition and cannot be changed after creation.public static Table create(Session session, String name, Column[] columns, long shardSize)
session
- Active session with the QuasarDB cluster.name
- Unique identifier for this timeseries table.columns
- Column definitions of this table. The ordering of the array will persist
through the table definition and cannot be changed after creation.shardSize
- The size of the shards in ms.public static void remove(Session session, String name)
session
- Active session with the QuasarDB clustername
- Unique identifier for this timeseries table.public static Writer writer(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static Writer writer(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.public static Writer asyncWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static Writer asyncWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.public static Writer fastWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static Writer fastWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Table to insert into.public static Writer truncateWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static Writer truncateWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Table to insert into.public static AutoFlushWriter autoFlushWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static AutoFlushWriter autoFlushWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.public static AutoFlushWriter autoFlushWriter(Session session, String name, long threshold)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static AutoFlushWriter autoFlushWriter(Session session, Table table, long threshold)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static AutoFlushWriter asyncAutoFlushWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static AutoFlushWriter asyncAutoFlushWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.public static AutoFlushWriter asyncAutoFlushWriter(Session session, String name, long threshold)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static AutoFlushWriter asyncAutoFlushWriter(Session session, Table table, long threshold)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static AutoFlushWriter fastAutoFlushWriter(Session session, String name)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.public static AutoFlushWriter fastAutoFlushWriter(Session session, Table table)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.public static AutoFlushWriter fastAutoFlushWriter(Session session, String name, long threshold)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static AutoFlushWriter fastAutoFlushWriter(Session session, Table table, long threshold)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.threshold
- The amount of rows to keep in local buffer before automatic flushing occurs.public static Reader reader(Session session, String name, TimeRange[] ranges)
session
- Active session with the QuasarDB cluster.name
- Timeseries table name. Must already exist.ranges
- Time ranges to look for.public static Reader reader(Session session, Table table, TimeRange[] ranges)
session
- Active session with the QuasarDB cluster.table
- Timeseries table.ranges
- Time time ranges to look for.public static void attachTag(Session session, Table table, String tag)
session
- Active session with the QuasarDB clustertable
- Timeseries tabletag
- Tag to attachpublic static void attachTag(Session session, String tableName, String tag)
session
- Active session with the QuasarDB clustertableName
- Name of the timeseries tabletag
- Tag to attachpublic static void attachTags(Session session, Table table, List<String> tags)
session
- Active session with the QuasarDB clustertable
- Timeseries tabletags
- Tags to attachpublic static void attachTags(Session session, String tableName, List<String> tags)
session
- Active session with the QuasarDB clustertableName
- Name of the timeseries tabletags
- Tags to attachpublic String getName()
public Column[] getColumns()
public int columnIndexById(String id)
id
- String identifier of the column.Copyright © 2021. All rights reserved.