public enum BackpressureHelper extends java.lang.Enum<BackpressureHelper>
| Modifier and Type | Method and Description |
|---|---|
static <T> long |
add(java.util.concurrent.atomic.AtomicLongFieldUpdater<T> updater,
T instance,
long n)
Atomically adds the positive value n to the value in the instance through the field updater and
caps the result at Long.MAX_VALUE and returns the previous value.
|
static long |
add(java.util.concurrent.atomic.AtomicLong requested,
long n)
Atomically adds the positive value n to the requested value in the AtomicLong and
caps the result at Long.MAX_VALUE and returns the previous value.
|
static long |
addCap(long a,
long b)
Adds two long values and caps the sum at Long.MAX_VALUE.
|
static long |
multiplyCap(long a,
long b)
Multiplies two long values and caps the product at Long.MAX_VALUE.
|
static BackpressureHelper |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static BackpressureHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static BackpressureHelper[] values()
for (BackpressureHelper c : BackpressureHelper.values()) System.out.println(c);
public static BackpressureHelper valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static long addCap(long a,
long b)
a - the first valueb - the second valuepublic static long multiplyCap(long a,
long b)
a - the first valueb - the second valuepublic static long add(java.util.concurrent.atomic.AtomicLong requested,
long n)
requested - the AtomicLong holding the current requested valuen - the value to add, must be positive (not verified)public static <T> long add(java.util.concurrent.atomic.AtomicLongFieldUpdater<T> updater,
T instance,
long n)
T - the instance typeupdater - the field updater for the requested valueinstance - the instance holding the requested valuen - the value to add, must be positive (not verified)