public abstract class AbstractTableApi<T> extends Object implements Api<T>
Service for reading and writing to Yamcs tables and streams
| Constructor and Description |
|---|
AbstractTableApi() |
| Modifier and Type | Method and Description |
|---|---|
void |
callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
T ctx,
com.google.protobuf.Message request,
Observer<com.google.protobuf.Message> future) |
Observer<com.google.protobuf.Message> |
callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
T ctx,
Observer<com.google.protobuf.Message> future) |
abstract void |
executeSql(T ctx,
Table.ExecuteSqlRequest request,
Observer<Table.ResultSet> observer)
Execute SQL
|
abstract void |
executeStreamingSql(T ctx,
Table.ExecuteSqlRequest request,
Observer<Table.ResultSet> observer)
Execute streaming SQL
|
com.google.protobuf.Descriptors.ServiceDescriptor |
getDescriptorForType() |
com.google.protobuf.Message |
getRequestPrototype(com.google.protobuf.Descriptors.MethodDescriptor method) |
com.google.protobuf.Message |
getResponsePrototype(com.google.protobuf.Descriptors.MethodDescriptor method) |
abstract void |
getStream(T ctx,
Table.GetStreamRequest request,
Observer<Table.StreamInfo> observer)
Get a stream
|
abstract void |
getTable(T ctx,
Table.GetTableRequest request,
Observer<Table.TableInfo> observer)
Get a table
|
abstract void |
getTableData(T ctx,
Table.GetTableDataRequest request,
Observer<Table.TableData> observer)
Get table data
|
abstract void |
listStreams(T ctx,
Table.ListStreamsRequest request,
Observer<Table.ListStreamsResponse> observer)
List streams
Note that this will only list the fixed columns of the stream.
|
abstract void |
listTables(T ctx,
Table.ListTablesRequest request,
Observer<Table.ListTablesResponse> observer)
List tables
The response will only include fixed columns of the table.
|
abstract void |
readRows(T 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``).
|
abstract void |
subscribeStream(T ctx,
Table.SubscribeStreamRequest request,
Observer<Table.StreamData> observer)
Receive stream updates
|
abstract void |
subscribeStreamStatistics(T ctx,
Table.SubscribeStreamStatisticsRequest request,
Observer<StreamEvent> observer)
Receive updates on stream stats
|
abstract Observer<Table.WriteRowsRequest> |
writeRows(T ctx,
Observer<Table.WriteRowsResponse> observer)
Imports a stream of rows
The table has to exist in order to load data into it.
|
public abstract void executeSql(T ctx, Table.ExecuteSqlRequest request, Observer<Table.ResultSet> observer)
Execute SQL
public abstract void executeStreamingSql(T ctx, Table.ExecuteSqlRequest request, Observer<Table.ResultSet> observer)
Execute streaming SQL
public abstract void listStreams(T 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.
public abstract void subscribeStreamStatistics(T ctx, Table.SubscribeStreamStatisticsRequest request, Observer<StreamEvent> observer)
Receive updates on stream stats
public abstract void getStream(T ctx, Table.GetStreamRequest request, Observer<Table.StreamInfo> observer)
Get a stream
public abstract void subscribeStream(T ctx, Table.SubscribeStreamRequest request, Observer<Table.StreamData> observer)
Receive stream updates
public abstract void listTables(T 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.
public abstract void getTable(T ctx, Table.GetTableRequest request, Observer<Table.TableInfo> observer)
Get a table
public abstract void getTableData(T ctx, Table.GetTableDataRequest request, Observer<Table.TableData> observer)
Get table data
public abstract void readRows(T 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.
public abstract Observer<Table.WriteRowsRequest> writeRows(T 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.
public final com.google.protobuf.Descriptors.ServiceDescriptor getDescriptorForType()
getDescriptorForType in interface Api<T>public final com.google.protobuf.Message getRequestPrototype(com.google.protobuf.Descriptors.MethodDescriptor method)
getRequestPrototype in interface Api<T>public final com.google.protobuf.Message getResponsePrototype(com.google.protobuf.Descriptors.MethodDescriptor method)
getResponsePrototype in interface Api<T>public final void callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
T ctx,
com.google.protobuf.Message request,
Observer<com.google.protobuf.Message> future)
callMethod in interface Api<T>Copyright © 2022 Space Applications Services. All rights reserved.