com.alibaba.rocketmq.remoting.netty
类 ResponseFuture

java.lang.Object
  继承者 com.alibaba.rocketmq.remoting.netty.ResponseFuture

public class ResponseFuture
extends Object

异步请求应答封装

从以下版本开始:
2013-7-13
作者:
shijia.wxr

构造方法摘要
ResponseFuture(int opaque, long timeoutMillis, InvokeCallback invokeCallback, SemaphoreReleaseOnlyOnce once)
           
 
方法摘要
 void executeInvokeCallback()
           
 long getBeginTimestamp()
           
 Throwable getCause()
           
 InvokeCallback getInvokeCallback()
           
 int getOpaque()
           
 RemotingCommand getResponseCommand()
           
 long getTimeoutMillis()
           
 boolean isSendRequestOK()
           
 boolean isTimeout()
           
 void putResponse(RemotingCommand responseCommand)
           
 void release()
           
 void setCause(Throwable cause)
           
 void setResponseCommand(RemotingCommand responseCommand)
           
 void setSendRequestOK(boolean sendRequestOK)
           
 String toString()
           
 RemotingCommand waitResponse(long timeoutMillis)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ResponseFuture

public ResponseFuture(int opaque,
                      long timeoutMillis,
                      InvokeCallback invokeCallback,
                      SemaphoreReleaseOnlyOnce once)
方法详细信息

executeInvokeCallback

public void executeInvokeCallback()

release

public void release()

isTimeout

public boolean isTimeout()

waitResponse

public RemotingCommand waitResponse(long timeoutMillis)
                             throws InterruptedException
抛出:
InterruptedException

putResponse

public void putResponse(RemotingCommand responseCommand)

getBeginTimestamp

public long getBeginTimestamp()

isSendRequestOK

public boolean isSendRequestOK()

setSendRequestOK

public void setSendRequestOK(boolean sendRequestOK)

getTimeoutMillis

public long getTimeoutMillis()

getInvokeCallback

public InvokeCallback getInvokeCallback()

getCause

public Throwable getCause()

setCause

public void setCause(Throwable cause)

getResponseCommand

public RemotingCommand getResponseCommand()

setResponseCommand

public void setResponseCommand(RemotingCommand responseCommand)

getOpaque

public int getOpaque()

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2012-2015. All Rights Reserved.