类 DefaultRequestFuture

  • 所有已实现的接口:
    RequestFuture

    public class DefaultRequestFuture
    extends java.lang.Object
    implements RequestFuture
    default request future.
    版本:
    $Id: DefaultRequestFuture.java, v 0.1 2020年09月01日 6:42 PM liuzunfei Exp $
    作者:
    liuzunfei
    • 字段详细资料

      • timeStamp

        private long timeStamp
      • isDone

        private volatile boolean isDone
      • isSuccess

        private boolean isSuccess
      • exception

        private java.lang.Exception exception
      • requestId

        private java.lang.String requestId
      • connectionId

        private java.lang.String connectionId
      • timeoutFuture

        private java.util.concurrent.ScheduledFuture timeoutFuture
    • 构造器详细资料

      • DefaultRequestFuture

        public DefaultRequestFuture()
      • DefaultRequestFuture

        public DefaultRequestFuture​(java.lang.String connectionId,
                                    java.lang.String requestId)
    • 方法详细资料

      • getRequestCallBack

        public RequestCallBack getRequestCallBack()
        Getter method for property requestCallBack.
        返回:
        property value of requestCallBack
      • getTimeStamp

        public long getTimeStamp()
        Getter method for property timeStamp.
        返回:
        property value of timeStamp
      • setResponse

        public void setResponse​(Response response)
      • setFailResult

        public void setFailResult​(java.lang.Exception e)
      • callBacInvoke

        private void callBacInvoke()
      • getRequestId

        public java.lang.String getRequestId()
      • isDone

        public boolean isDone()
        从接口复制的说明: RequestFuture
        check that it is done or not..
        指定者:
        isDone 在接口中 RequestFuture
        返回:
        is done .
      • get

        public Response get()
                     throws java.lang.InterruptedException
        从接口复制的说明: RequestFuture
        get response without timeouts.
        指定者:
        get 在接口中 RequestFuture
        返回:
        return response if done.
        抛出:
        java.lang.InterruptedException
      • get

        public Response get​(long timeout)
                     throws java.util.concurrent.TimeoutException,
                            java.lang.InterruptedException
        从接口复制的说明: RequestFuture
        get response with a given timeouts.
        指定者:
        get 在接口中 RequestFuture
        参数:
        timeout - timeout milliseconds.
        返回:
        return response if done.
        抛出:
        java.util.concurrent.TimeoutException
        java.lang.InterruptedException
      • getConnectionId

        public java.lang.String getConnectionId()
        Getter method for property connectionId.
        返回:
        property value of connectionId
      • setTimeoutFuture

        public void setTimeoutFuture​(java.util.concurrent.ScheduledFuture timeoutFuture)
        Setter method for property timeoutFuture.
        参数:
        timeoutFuture - value to be assigned to property timeoutFuture