public class DefaultInvokeFuture extends Object implements InvokeFuture
| 构造器和说明 |
|---|
DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory)
Constructor.
|
DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory,
InvokeContext invokeContext) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addTimeout(io.netty.util.Timeout timeout)
Add timeout for the future.
|
void |
cancelTimeout()
Cancel the timeout.
|
RemotingCommand |
createConnectionClosedResponse(InetSocketAddress responseHost)
Create a remoting command response when connection closed
|
void |
executeInvokeCallback()
Execute the callback.
|
ClassLoader |
getAppClassLoader() |
Throwable |
getCause()
Get the cause of exception of the future.
|
InvokeCallback |
getInvokeCallback()
Get the application callback of the future.
|
InvokeContext |
getInvokeContext()
get invoke context
|
byte |
getProtocolCode()
Get the protocol code of command.
|
int |
invokeId()
Get the id of the invocation.
|
boolean |
isDone()
Whether the future is done.
|
void |
putResponse(RemotingCommand response)
Put the response to the future.
|
void |
setCause(Throwable cause)
Set the cause if exception caught.
|
void |
setInvokeContext(InvokeContext invokeContext)
set invoke context
|
void |
tryAsyncExecuteInvokeCallbackAbnormally()
Asynchronous execute the callback abnormally.
|
ResponseCommand |
waitResponse()
Wait response with unlimit timeout
|
ResponseCommand |
waitResponse(long timeoutMillis)
Wait response with timeout.
|
public DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory)
invokeId - callbackListener - callback - protocol - public DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory,
InvokeContext invokeContext)
invokeId - callbackListener - callback - protocol - invokeContext - public ResponseCommand waitResponse(long timeoutMillis) throws InterruptedException
InvokeFuturewaitResponse 在接口中 InvokeFutureInterruptedExceptionInvokeFuture.waitResponse(long)public ResponseCommand waitResponse() throws InterruptedException
InvokeFuturewaitResponse 在接口中 InvokeFutureInterruptedExceptionInvokeFuture.waitResponse(long)public RemotingCommand createConnectionClosedResponse(InetSocketAddress responseHost)
InvokeFuturecreateConnectionClosedResponse 在接口中 InvokeFuturepublic void putResponse(RemotingCommand response)
InvokeFuturepublic boolean isDone()
InvokeFutureisDone 在接口中 InvokeFutureInvokeFuture.isDone()public ClassLoader getAppClassLoader()
getAppClassLoader 在接口中 InvokeFuturepublic int invokeId()
InvokeFutureinvokeId 在接口中 InvokeFutureInvokeFuture.invokeId()public void executeInvokeCallback()
InvokeFutureexecuteInvokeCallback 在接口中 InvokeFuturepublic InvokeCallback getInvokeCallback()
InvokeFuturegetInvokeCallback 在接口中 InvokeFutureInvokeFuture.getInvokeCallback()public void addTimeout(io.netty.util.Timeout timeout)
InvokeFutureaddTimeout 在接口中 InvokeFutureInvokeFuture.addTimeout(io.netty.util.Timeout)public void cancelTimeout()
InvokeFuturecancelTimeout 在接口中 InvokeFutureInvokeFuture.cancelTimeout()public void setCause(Throwable cause)
InvokeFuturesetCause 在接口中 InvokeFutureInvokeFuture.setCause(java.lang.Throwable)public Throwable getCause()
InvokeFuturegetCause 在接口中 InvokeFutureInvokeFuture.getCause()public byte getProtocolCode()
InvokeFuturegetProtocolCode 在接口中 InvokeFutureInvokeFuture.getProtocolCode()public void setInvokeContext(InvokeContext invokeContext)
InvokeFuturesetInvokeContext 在接口中 InvokeFutureInvokeFuture.getInvokeContext()public InvokeContext getInvokeContext()
InvokeFuturegetInvokeContext 在接口中 InvokeFutureInvokeFuture.setInvokeContext(InvokeContext)public void tryAsyncExecuteInvokeCallbackAbnormally()
InvokeFutureCopyright © 2018. All rights reserved.