类 AsyncClientHandler<Q,R>
- java.lang.Object
-
- org.apache.iotdb.confignode.client.async.handlers.AsyncClientHandler<Q,R>
-
- 类型参数:
Q- ClassName of RPC requestR- ClassName of RPC response
public class AsyncClientHandler<Q,R> extends java.lang.ObjectAsynchronous Client handler
-
-
字段概要
字段 修饰符和类型 字段 说明 protected DataNodeRequestTyperequestType
-
构造器概要
构造器 构造器 说明 AsyncClientHandler(DataNodeRequestType requestType)Custom constructorAsyncClientHandler(DataNodeRequestType requestType, java.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> dataNodeLocationMap)Constructor for null requestsAsyncClientHandler(DataNodeRequestType requestType, Q request, java.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> dataNodeLocationMap)Constructor for unique request
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 AbstractAsyncRPCHandler<?>createAsyncRPCHandler(int requestId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation targetDataNode)java.util.concurrent.CountDownLatchgetCountDownLatch()org.apache.iotdb.common.rpc.thrift.TDataNodeLocationgetDataNodeLocation(int requestId)QgetRequest(int requestId)java.util.List<java.lang.Integer>getRequestIndices()DataNodeRequestTypegetRequestType()java.util.List<R>getResponseList()java.util.Map<java.lang.Integer,R>getResponseMap()voidputDataNodeLocation(int requestId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation dataNodeLocation)voidputRequest(int requestId, Q request)voidresetCountDownLatch()Always reset CountDownLatch before retry
-
-
-
字段详细资料
-
requestType
protected final DataNodeRequestType requestType
-
-
构造器详细资料
-
AsyncClientHandler
public AsyncClientHandler(DataNodeRequestType requestType)
Custom constructor
-
AsyncClientHandler
public AsyncClientHandler(DataNodeRequestType requestType, java.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> dataNodeLocationMap)
Constructor for null requests
-
AsyncClientHandler
public AsyncClientHandler(DataNodeRequestType requestType, Q request, java.util.Map<java.lang.Integer,org.apache.iotdb.common.rpc.thrift.TDataNodeLocation> dataNodeLocationMap)
Constructor for unique request
-
-
方法详细资料
-
putRequest
public void putRequest(int requestId, Q request)
-
putDataNodeLocation
public void putDataNodeLocation(int requestId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation dataNodeLocation)
-
getRequestType
public DataNodeRequestType getRequestType()
-
getRequestIndices
public java.util.List<java.lang.Integer> getRequestIndices()
-
getRequest
public Q getRequest(int requestId)
-
getDataNodeLocation
public org.apache.iotdb.common.rpc.thrift.TDataNodeLocation getDataNodeLocation(int requestId)
-
getResponseList
public java.util.List<R> getResponseList()
-
getResponseMap
public java.util.Map<java.lang.Integer,R> getResponseMap()
-
resetCountDownLatch
public void resetCountDownLatch()
Always reset CountDownLatch before retry
-
getCountDownLatch
public java.util.concurrent.CountDownLatch getCountDownLatch()
-
createAsyncRPCHandler
public AbstractAsyncRPCHandler<?> createAsyncRPCHandler(int requestId, org.apache.iotdb.common.rpc.thrift.TDataNodeLocation targetDataNode)
-
-