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)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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()
Get application classloader.
|
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 - invoke idcallbackListener - callback listenercallback - callbackprotocol - protocol codecommandFactory - command factorypublic DefaultInvokeFuture(int invokeId,
InvokeCallbackListener callbackListener,
InvokeCallback callback,
byte protocol,
CommandFactory commandFactory,
InvokeContext invokeContext)
invokeId - invoke idcallbackListener - callback listenercallback - callbackprotocol - protocolcommandFactory - command factoryinvokeContext - invoke contextpublic ResponseCommand waitResponse(long timeoutMillis) throws InterruptedException
InvokeFuturewaitResponse 在接口中 InvokeFuturetimeoutMillis - time out in millisecondInterruptedException - if interruptedpublic ResponseCommand waitResponse() throws InterruptedException
InvokeFuturewaitResponse 在接口中 InvokeFutureInterruptedException - if interruptedpublic RemotingCommand createConnectionClosedResponse(InetSocketAddress responseHost)
InvokeFuturecreateConnectionClosedResponse 在接口中 InvokeFutureresponseHost - target hostpublic void putResponse(RemotingCommand response)
InvokeFutureputResponse 在接口中 InvokeFutureresponse - remoting commandInvokeFuture.putResponse(com.alipay.remoting.RemotingCommand)public boolean isDone()
InvokeFutureisDone 在接口中 InvokeFutureInvokeFuture.isDone()public ClassLoader getAppClassLoader()
InvokeFuturegetAppClassLoader 在接口中 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 © 2020. All rights reserved.