Class Request

  • Direct Known Subclasses:
    LearnerSyncRequest

    public class Request
    extends Object
    This is the structure that represents a request moving through a chain of RequestProcessors. There are various pieces of information that is tacked onto the request as it is processed.
    • Field Detail

      • requestOfDeath

        public static final Request requestOfDeath
      • sessionId

        public final long sessionId
      • cxid

        public final int cxid
      • type

        public final int type
      • zxid

        public long zxid
      • authInfo

        public final List<Id> authInfo
      • createTime

        public final long createTime
      • prepQueueStartTime

        public long prepQueueStartTime
      • prepStartTime

        public long prepStartTime
      • commitProcQueueStartTime

        public long commitProcQueueStartTime
      • commitRecvTime

        public long commitRecvTime
      • syncQueueStartTime

        public long syncQueueStartTime
      • requestThrottleQueueTime

        public long requestThrottleQueueTime
    • Constructor Detail

      • Request

        public Request​(long sessionId,
                       int xid,
                       int type,
                       TxnHeader hdr,
                       Record txn,
                       long zxid)
    • Method Detail

      • isThrottled

        public boolean isThrottled()
      • setIsThrottled

        public void setIsThrottled​(boolean val)
      • isThrottlable

        public boolean isThrottlable()
      • isLocalSession

        public boolean isLocalSession()
      • setLocalSession

        public void setLocalSession​(boolean isLocalSession)
      • setLargeRequestSize

        public void setLargeRequestSize​(int size)
      • getLargeRequestSize

        public int getLargeRequestSize()
      • getOwner

        public Object getOwner()
      • setOwner

        public void setOwner​(Object owner)
      • setHdr

        public void setHdr​(TxnHeader hdr)
      • getTxn

        public Record getTxn()
      • setTxn

        public void setTxn​(Record txn)
      • getConnection

        public ServerCnxn getConnection()
      • getStaleLatencyCheck

        public static boolean getStaleLatencyCheck()
      • setStaleLatencyCheck

        public static void setStaleLatencyCheck​(boolean check)
      • getStaleConnectionCheck

        public static boolean getStaleConnectionCheck()
      • setStaleConnectionCheck

        public static void setStaleConnectionCheck​(boolean check)
      • isStale

        public boolean isStale()
      • mustDrop

        public boolean mustDrop()
        A prior request was dropped on this request's connection and therefore this request must also be dropped to ensure correct ordering semantics.
      • isQuorum

        public boolean isQuorum()
      • op2String

        public static String op2String​(int op)
      • logLatency

        public void logLatency​(Summary metric)
      • logLatency

        public void logLatency​(Summary metric,
                               long currentTime)
      • logLatency

        public void logLatency​(SummarySet metric,
                               String key,
                               long currentTime)
      • getUsersForAudit

        public String getUsersForAudit()
        Returns a formatted, comma-separated list of the user IDs associated with this Request, or null if no user IDs were found. The return value is used for audit logging. While it may be easy on the eyes, it is underspecified: it does not mention the corresponding scheme, nor are its components escaped. This is not a security feature.
        Returns:
        a comma-separated list of user IDs, or null if no user IDs were found.
      • getTxnDigest

        public TxnDigest getTxnDigest()
      • setTxnDigest

        public void setTxnDigest​(TxnDigest txnDigest)
      • isFromLearner

        public boolean isFromLearner()