public class TableApiClient extends AbstractTableApi<Void>
Service for reading and writing to Yamcs tables and streams
| Constructor and Description |
|---|
TableApiClient(MethodHandler handler) |
| Modifier and Type | Method and Description |
|---|---|
void |
executeSql(Void ctx,
Table.ExecuteSqlRequest request,
Observer<Table.ResultSet> observer)
Execute SQL
|
void |
executeStreamingSql(Void ctx,
Table.ExecuteSqlRequest request,
Observer<Table.ResultSet> observer)
Execute streaming SQL
|
void |
getStream(Void ctx,
Table.GetStreamRequest request,
Observer<Table.StreamInfo> observer)
Get a stream
|
void |
getTable(Void ctx,
Table.GetTableRequest request,
Observer<Table.TableInfo> observer)
Get a table
|
void |
getTableData(Void ctx,
Table.GetTableDataRequest request,
Observer<Table.TableData> observer)
Get table data
|
void |
listStreams(Void ctx,
Table.ListStreamsRequest request,
Observer<Table.ListStreamsResponse> observer)
List streams
Note that this will only list the fixed columns of the stream.
|
void |
listTables(Void ctx,
Table.ListTablesRequest request,
Observer<Table.ListTablesResponse> observer)
List tables
The response will only include fixed columns of the table.
|
void |
readRows(Void ctx,
Table.ReadRowsRequest request,
Observer<Table.Row> observer)
Streams back the contents of all rows in key order
The ``ColumnInfo`` message assigns an integer ``id`` for each column
and the ``id`` is present in each cell belonging to that column (this
is done in order to avoid sending the ``ColumnInfo`` with each ``Cell``).
|
void |
subscribeStream(Void ctx,
Table.SubscribeStreamRequest request,
Observer<Table.StreamData> observer)
Receive stream updates
|
void |
subscribeStreamStatistics(Void ctx,
Table.SubscribeStreamStatisticsRequest request,
Observer<StreamEvent> observer)
Receive updates on stream stats
|
Observer<Table.WriteRowsRequest> |
writeRows(Void ctx,
Observer<Table.WriteRowsResponse> observer)
Imports a stream of rows
The table has to exist in order to load data into it.
|
callMethod, callMethod, getDescriptorForType, getRequestPrototype, getResponsePrototypepublic TableApiClient(MethodHandler handler)
public final void executeSql(Void ctx, Table.ExecuteSqlRequest request, Observer<Table.ResultSet> observer)
Execute SQL
executeSql in class AbstractTableApi<Void>public final void executeStreamingSql(Void ctx, Table.ExecuteSqlRequest request, Observer<Table.ResultSet> observer)
Execute streaming SQL
executeStreamingSql in class AbstractTableApi<Void>public final void listStreams(Void ctx, Table.ListStreamsRequest request, Observer<Table.ListStreamsResponse> observer)
List streams Note that this will only list the fixed columns of the stream. Tuples may always have extra columns.
listStreams in class AbstractTableApi<Void>public final void subscribeStreamStatistics(Void ctx, Table.SubscribeStreamStatisticsRequest request, Observer<StreamEvent> observer)
Receive updates on stream stats
subscribeStreamStatistics in class AbstractTableApi<Void>public final void getStream(Void ctx, Table.GetStreamRequest request, Observer<Table.StreamInfo> observer)
Get a stream
getStream in class AbstractTableApi<Void>public final void subscribeStream(Void ctx, Table.SubscribeStreamRequest request, Observer<Table.StreamData> observer)
Receive stream updates
subscribeStream in class AbstractTableApi<Void>public final void listTables(Void ctx, Table.ListTablesRequest request, Observer<Table.ListTablesResponse> observer)
List tables The response will only include fixed columns of the table. Tuples may always add extra value columns.
listTables in class AbstractTableApi<Void>public final void getTable(Void ctx, Table.GetTableRequest request, Observer<Table.TableInfo> observer)
Get a table
getTable in class AbstractTableApi<Void>public final void getTableData(Void ctx, Table.GetTableDataRequest request, Observer<Table.TableData> observer)
Get table data
getTableData in class AbstractTableApi<Void>public final void readRows(Void ctx, Table.ReadRowsRequest request, Observer<Table.Row> observer)
Streams back the contents of all rows in key order The ``ColumnInfo`` message assigns an integer ``id`` for each column and the ``id`` is present in each cell belonging to that column (this is done in order to avoid sending the ``ColumnInfo`` with each ``Cell``). The column id starts from 0 and are incremented with each new column found. The ids are only valid during one single dump. The dumped data does not contain information on any table characteristics such as (primary) key, partitioning or other storage options.
readRows in class AbstractTableApi<Void>public final Observer<Table.WriteRowsRequest> writeRows(Void ctx, Observer<Table.WriteRowsResponse> observer)
Imports a stream of rows The table has to exist in order to load data into it. As soon as the server detects an error with one of the written rows, it will forcefully close the connection and send back an early error message. The client should stop streaming and handle the error. Note that the erratic condition causes the connection to be closed even if the ``Keep-Alive`` request header was enabled. The error response is of type ``ExceptionMessage`` and contains a detail message of type ``WriteRowsExceptionDetail`` that provides the number of rows that were successfully written by the client. The client can use this information to link the error message to a row (i.e. the bad row is at position ``count + 1`` of the stream). One possible error could be that the table has defined a (primary) key and one of the loaded rows contains no value for one of the columns of the key.
writeRows in class AbstractTableApi<Void>Copyright © 2020 Space Applications Services. All rights reserved.