public class TSDBSubscribe extends Object
| Constructor and Description |
|---|
TSDBSubscribe(TSDBJNIConnector connecter) |
| Modifier and Type | Method and Description |
|---|---|
TSDBResultSet |
consume(long subscription) |
static ScheduledExecutorService |
getTimerInstance() |
long |
subscribe(String topic,
String sql,
boolean restart,
int period)
sync subscribe
|
long |
subscribe(String topic,
String sql,
boolean restart,
int period,
TSDBSubscribeCallBack callBack)
async subscribe
|
void |
unsubscribe(long subscription,
boolean isKeep)
cancel subscribe
|
public TSDBSubscribe(TSDBJNIConnector connecter) throws SQLException
SQLExceptionpublic static ScheduledExecutorService getTimerInstance()
public long subscribe(String topic, String sql, boolean restart, int period) throws SQLException
topic - sql - restart - period - SQLExceptionpublic long subscribe(String topic, String sql, boolean restart, int period, TSDBSubscribeCallBack callBack) throws SQLException
topic - sql - restart - period - callBack - SQLExceptionpublic TSDBResultSet consume(long subscription) throws OperationsException, SQLException
OperationsExceptionSQLExceptionpublic void unsubscribe(long subscription,
boolean isKeep)
throws SQLException
subscription - isKeep - SQLExceptionCopyright © 2020. All rights reserved.