public class Request extends Object
Modifier and Type | Field and Description |
---|---|
List<Id> |
authInfo |
ServerCnxn |
cnxn |
long |
commitProcQueueStartTime |
long |
commitRecvTime |
long |
createTime |
int |
cxid |
long |
prepQueueStartTime |
long |
prepStartTime |
QuorumVerifier |
qv |
ByteBuffer |
request |
static Request |
requestOfDeath |
long |
requestThrottleQueueTime |
long |
sessionId |
long |
syncQueueStartTime |
int |
type |
long |
zxid |
Constructor and Description |
---|
Request(long sessionId,
int xid,
int type,
TxnHeader hdr,
Record txn,
long zxid) |
Request(ServerCnxn cnxn,
long sessionId,
int xid,
int type,
ByteBuffer bb,
List<Id> authInfo) |
Modifier and Type | Method and Description |
---|---|
ServerCnxn |
getConnection() |
KeeperException |
getException() |
TxnHeader |
getHdr() |
int |
getLargeRequestSize() |
Object |
getOwner() |
static boolean |
getStaleConnectionCheck() |
static boolean |
getStaleLatencyCheck() |
Record |
getTxn() |
TxnDigest |
getTxnDigest() |
String |
getUsersForAudit()
Returns a formatted, comma-separated list of the user IDs
associated with this
Request , or null if no
user IDs were found. |
boolean |
isFromLearner() |
boolean |
isLocalSession() |
boolean |
isQuorum() |
boolean |
isStale() |
boolean |
isThrottlable() |
boolean |
isThrottled() |
void |
logLatency(Summary metric) |
void |
logLatency(Summary metric,
long currentTime) |
void |
logLatency(SummarySet metric,
String key) |
void |
logLatency(SummarySet metric,
String key,
long currentTime) |
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.
|
static String |
op2String(int op) |
void |
setException(KeeperException e) |
void |
setHdr(TxnHeader hdr) |
void |
setIsThrottled(boolean val) |
void |
setLargeRequestSize(int size) |
void |
setLocalSession(boolean isLocalSession) |
void |
setOwner(Object owner) |
static void |
setStaleConnectionCheck(boolean check) |
static void |
setStaleLatencyCheck(boolean check) |
void |
setTxn(Record txn) |
void |
setTxnDigest(TxnDigest txnDigest) |
String |
toString() |
public static final Request requestOfDeath
public final long sessionId
public final int cxid
public final int type
public final ByteBuffer request
public final ServerCnxn cnxn
public long zxid
public final long createTime
public long prepQueueStartTime
public long prepStartTime
public long commitProcQueueStartTime
public long commitRecvTime
public long syncQueueStartTime
public long requestThrottleQueueTime
public QuorumVerifier qv
public Request(ServerCnxn cnxn, long sessionId, int xid, int type, ByteBuffer bb, List<Id> authInfo)
public boolean isThrottled()
public void setIsThrottled(boolean val)
public boolean isThrottlable()
public boolean isLocalSession()
public void setLocalSession(boolean isLocalSession)
public void setLargeRequestSize(int size)
public int getLargeRequestSize()
public Object getOwner()
public void setOwner(Object owner)
public TxnHeader getHdr()
public void setHdr(TxnHeader hdr)
public Record getTxn()
public void setTxn(Record txn)
public ServerCnxn getConnection()
public static boolean getStaleLatencyCheck()
public static void setStaleLatencyCheck(boolean check)
public static boolean getStaleConnectionCheck()
public static void setStaleConnectionCheck(boolean check)
public boolean isStale()
public boolean mustDrop()
public boolean isQuorum()
public static String op2String(int op)
public void setException(KeeperException e)
public KeeperException getException()
public void logLatency(Summary metric)
public void logLatency(Summary metric, long currentTime)
public void logLatency(SummarySet metric, String key, long currentTime)
public void logLatency(SummarySet metric, String key)
public String getUsersForAudit()
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.null
if
no user IDs were found.public TxnDigest getTxnDigest()
public void setTxnDigest(TxnDigest txnDigest)
public boolean isFromLearner()
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.