@InterfaceAudience.Private
public class AsyncRpcChannel
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
protected static java.util.Map<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.TokenIdentifier.Kind,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> |
tokenHandlers |
| Constructor and Description |
|---|
AsyncRpcChannel(io.netty.bootstrap.Bootstrap bootstrap,
AsyncRpcClient client,
org.apache.hadoop.hbase.ipc.RpcClient.ConnectionId connectionId)
Constructor for netty RPC channel
|
| Modifier and Type | Method and Description |
|---|---|
io.netty.util.concurrent.Promise<com.google.protobuf.Message> |
callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
AsyncPayloadCarryingRpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.Message responsePrototype)
Calls method on channel
|
io.netty.util.concurrent.Promise<com.google.protobuf.Message> |
callMethodWithPromise(com.google.protobuf.Descriptors.MethodDescriptor method,
AsyncPayloadCarryingRpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.Message responsePrototype)
Calls method and returns a promise
|
void |
cleanupCalls(boolean cleanAll)
Clean up calls.
|
void |
close(java.lang.Throwable e)
Close connection
|
boolean |
isAlive()
Check if the connection is alive
|
java.lang.String |
toString() |
public static final org.apache.commons.logging.Log LOG
protected static final java.util.Map<org.apache.hadoop.hbase.protobuf.generated.AuthenticationProtos.TokenIdentifier.Kind,org.apache.hadoop.security.token.TokenSelector<? extends org.apache.hadoop.security.token.TokenIdentifier>> tokenHandlers
public AsyncRpcChannel(io.netty.bootstrap.Bootstrap bootstrap,
AsyncRpcClient client,
org.apache.hadoop.hbase.ipc.RpcClient.ConnectionId connectionId)
bootstrap - to construct channel onclient - to connect withconnectionId - of connectionpublic io.netty.util.concurrent.Promise<com.google.protobuf.Message> callMethod(com.google.protobuf.Descriptors.MethodDescriptor method,
AsyncPayloadCarryingRpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.Message responsePrototype)
method - to callcontroller - to run call withrequest - to sendresponsePrototype - to construct response withpublic io.netty.util.concurrent.Promise<com.google.protobuf.Message> callMethodWithPromise(com.google.protobuf.Descriptors.MethodDescriptor method,
AsyncPayloadCarryingRpcController controller,
com.google.protobuf.Message request,
com.google.protobuf.Message responsePrototype)
throws java.net.ConnectException
method - to callcontroller - to run call withrequest - to sendresponsePrototype - for response messagejava.net.ConnectException - on connection failurespublic void close(java.lang.Throwable e)
e - exception on closepublic void cleanupCalls(boolean cleanAll)
cleanAll - true if all calls should be cleaned, false for only the timed out callspublic boolean isAlive()
public java.lang.String toString()
toString in class java.lang.Object