public class TimestreamDataTable extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
TimestreamDataTable(AsyncClient asyncClient,
String dataTableName,
String metaTable,
String index,
TableStoreWriter dataWriter,
com.alicloud.openservices.tablestore.timestream.internal.MetaCacheManager metaCacheManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncWrite(TimestreamIdentifier identifier,
Point point)
异步写入数据,如果写入失败需要通过
TableStoreCallback来获取 |
protected void |
close() |
void |
flush()
将内存中缓存的所有数据写入到数据库中
|
DataGetter |
get(TimestreamIdentifier identifier)
查询单条时间线的数据
|
void |
write(TimestreamIdentifier identifier,
Point point)
同步写入数据,如果数据写入失败会抛异常
|
protected TimestreamDataTable(AsyncClient asyncClient, String dataTableName, String metaTable, String index, TableStoreWriter dataWriter, com.alicloud.openservices.tablestore.timestream.internal.MetaCacheManager metaCacheManager)
protected void close()
public void write(TimestreamIdentifier identifier, Point point)
identifier - 时间线标示point - 数据点public void asyncWrite(TimestreamIdentifier identifier, Point point)
TableStoreCallback来获取
异步接口,通过TableStoreWriter写入数据,相比同步接口,该接口数据写入的吞吐更好
identifier - 时间线标示point - 数据点public DataGetter get(TimestreamIdentifier identifier)
identifier - 时间线标示public void flush()
Copyright © 2024. All Rights Reserved.