Package org.microproxy.extras
Record Class ConcurrencyLimiter.KeyStats
java.lang.Object
java.lang.Record
org.microproxy.extras.ConcurrencyLimiter.KeyStats
- Record Components:
permits- how many exchanges with this key may run at onceinUse- exchanges running now (in shadow mode this may exceedpermits)waiting- requests queued for a permitrejected- requests over the limit since the key became busy
- Enclosing class:
ConcurrencyLimiter
public static record ConcurrencyLimiter.KeyStats(int permits, int inUse, int waiting, long rejected)
extends Record
One key's state.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyStats(int permits, int inUse, int waiting, long rejected) Creates an instance of aKeyStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intinUse()Returns the value of theinUserecord component.intpermits()Returns the value of thepermitsrecord component.longrejected()Returns the value of therejectedrecord component.final StringtoString()Returns a string representation of this record class.intwaiting()Returns the value of thewaitingrecord component.
-
Constructor Details
-
KeyStats
public KeyStats(int permits, int inUse, int waiting, long rejected) Creates an instance of aKeyStatsrecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
permits
public int permits()Returns the value of thepermitsrecord component.- Returns:
- the value of the
permitsrecord component
-
inUse
public int inUse()Returns the value of theinUserecord component.- Returns:
- the value of the
inUserecord component
-
waiting
public int waiting()Returns the value of thewaitingrecord component.- Returns:
- the value of the
waitingrecord component
-
rejected
public long rejected()Returns the value of therejectedrecord component.- Returns:
- the value of the
rejectedrecord component
-