public interface TunnelClientInterface
| Modifier and Type | Method and Description |
|---|---|
com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointResponse |
checkpoint(com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
设置某个Channel的Checkpoint和Checkpoint对应的SequenceNumber。
|
com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelResponse |
connectTunnel(com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
为指定Tunnel分配客户端标识(ClientId), 同时可以传输一些Client的参数给Master,比如client心跳超时时间,client的类型等。
|
CreateTunnelResponse |
createTunnel(CreateTunnelRequest request)
创建一个Tunnel。
|
DeleteTunnelResponse |
deleteTunnel(DeleteTunnelRequest request)
删除一个Tunnel。
|
DescribeTunnelResponse |
describeTunnel(DescribeTunnelRequest request)
获取某个Tunnel下的具体信息。
|
com.alicloud.openservices.tablestore.model.tunnel.internal.GetCheckpointResponse |
getCheckpoint(com.alicloud.openservices.tablestore.model.tunnel.internal.GetCheckpointRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
获取某个Channel上次记录的Checkpoint和Checkpoint对应的SequenceNumber。
|
com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatResponse |
heartbeat(com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
Heartbeat操作的作用为(TunnelClient)保持心跳,同时可以获取可以消费的Channel,上报一些处理状态。
当心跳超时后认为TunnelClient下线,需要重新Connect。
|
ListTunnelResponse |
listTunnel(ListTunnelRequest request)
获取某个表下的Tunnel信息。
|
com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsResponse |
readRecords(com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
从某个Channel中读取数据,读取时需要指定Tunnel ID, Client ID, Channel ID和起始Token值。第一次读取时,
使用上次记录的Token(Checkpoint)开始读取,之后每次使用返回的NextToken开始读取。
|
void |
shutdown()
释放资源。
|
com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelResponse |
shutdownTunnel(com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest request)
高级接口: 不推荐直接使用,无特殊需求,请优先使用TunnelWorker自动化数据处理框架。
关闭某个TunnelClient, 断开与Tunnel的服务端的连接。
|
CreateTunnelResponse createTunnel(CreateTunnelRequest request) throws TableStoreException, ClientException
request - 创建Tunnel所需的参数,详见CreateTunnelRequestCreateTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常ListTunnelResponse listTunnel(ListTunnelRequest request) throws TableStoreException, ClientException
request - 列举某张表下的Tunnel所需的参数,详见ListTunnelRequestListTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常DescribeTunnelResponse describeTunnel(DescribeTunnelRequest request) throws TableStoreException, ClientException
request - 描述某个Tunnel下的详细信息所需的参数,详见DescribeTunnelRequestDescribeTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常DeleteTunnelResponse deleteTunnel(DeleteTunnelRequest request) throws TableStoreException, ClientException
request - 删除某个Tunnel所需的参数,详见DeleteTunnelRequestDeleteTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelResponse connectTunnel(com.alicloud.openservices.tablestore.model.tunnel.internal.ConnectTunnelRequest request)
throws TableStoreException,
ClientException
request - 连接某个Tunnel所需的参数,详见ConnectTunnelRequestConnectTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatResponse heartbeat(com.alicloud.openservices.tablestore.model.tunnel.internal.HeartbeatRequest request)
throws TableStoreException,
ClientException
request - 探测心跳所需的参数,详见HeartbeatRequestHeartbeatResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelResponse shutdownTunnel(com.alicloud.openservices.tablestore.model.tunnel.internal.ShutdownTunnelRequest request)
throws TableStoreException,
ClientException
request - 关闭TunnelClient所需的参数,详见ShutdownTunnelRequestShutdownTunnelResponseTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.GetCheckpointResponse getCheckpoint(com.alicloud.openservices.tablestore.model.tunnel.internal.GetCheckpointRequest request)
throws TableStoreException,
ClientException
request - 获取某个Channel的Checkpoint所需的参数,详见GetCheckpointRequestTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsResponse readRecords(com.alicloud.openservices.tablestore.model.tunnel.internal.ReadRecordsRequest request)
throws TableStoreException,
ClientException
request - 读取某个Channel中的数据, 详见ReadRecordsRequestTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointResponse checkpoint(com.alicloud.openservices.tablestore.model.tunnel.internal.CheckpointRequest request)
throws TableStoreException,
ClientException
request - 设置某个Channel上的CheckpointTableStoreException - TableStore服务返回的异常ClientException - 请求的返回结果无效、或遇到网络异常void shutdown()
请确保在所有请求执行完毕之后释放资源。释放资源之后将不能再发送请求,正在执行的请求可能无法返回结果。
Copyright © 2024. All Rights Reserved.