T
- public abstract class TAsyncMethodCall<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TAsyncMethodCall.State |
Modifier and Type | Field and Description |
---|---|
protected TAsyncClient |
client |
protected TNonblockingTransport |
transport |
Modifier | Constructor and Description |
---|---|
protected |
TAsyncMethodCall(TAsyncClient client,
TProtocolFactory protocolFactory,
TNonblockingTransport transport,
AsyncMethodCallback<T> callback,
boolean isOneway) |
Modifier and Type | Method and Description |
---|---|
TAsyncClient |
getClient() |
protected java.nio.ByteBuffer |
getFrameBuffer() |
protected long |
getSequenceId() |
protected long |
getStartTime() |
protected TAsyncMethodCall.State |
getState() |
long |
getTimeoutTimestamp() |
boolean |
hasTimeout() |
protected boolean |
isFinished() |
protected void |
onError(java.lang.Exception e) |
protected void |
prepareMethodCall()
Initialize buffers.
|
protected void |
transition(java.nio.channels.SelectionKey key)
Transition to next state, doing whatever work is required.
|
protected abstract void |
write_args(TProtocol protocol) |
protected final TNonblockingTransport transport
protected final TAsyncClient client
protected TAsyncMethodCall(TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport, AsyncMethodCallback<T> callback, boolean isOneway)
protected TAsyncMethodCall.State getState()
protected boolean isFinished()
protected long getStartTime()
protected long getSequenceId()
public TAsyncClient getClient()
public boolean hasTimeout()
public long getTimeoutTimestamp()
protected abstract void write_args(TProtocol protocol) throws TException
TException
protected void prepareMethodCall() throws TException
TException
- if buffer initialization failsprotected java.nio.ByteBuffer getFrameBuffer()
protected void transition(java.nio.channels.SelectionKey key)
key
- protected void onError(java.lang.Exception e)