| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static long | Returns: the original value before the addthe requested, long AtomicLong holding the current requested valuethe value to add, must be positive (not verified) n)Atomically adds the positive value n to the requested value in the |
| public static long | Returns: the original value before the addthe requested, long AtomicLong holding the current requested valuethe value to add, must be positive (not verified) n)Atomically adds the positive value n to the requested value in the |
| public static long | Returns: the sum capped atLong#MAX_VALUEthe first value a, long the second value b)Adds two long values and caps the sum at |
| public static long | Returns: the product capped atLong#MAX_VALUEthe first value a, long the second value b)Multiplies two long values and caps the product at |
| public static long | Returns: the new amountthe target field holding the current requested amount requested, long the produced element count, positive (not validated) n)Atomically subtract the given number (positive, not validated) from the target field unless it contains |
| public static long | Returns: the new amountthe target field holding the current requested amount requested, long the produced element count, positive (not validated) n)Atomically subtract the given number (positive, not validated) from the target field if
it doesn't contain |
| BackpressureHelper | back to summary |
|---|---|
| private BackpressureHelper() Utility class. | |
| add | back to summary |
|---|---|
| public static long add(@NonNull AtomicLong requested, long n) Atomically adds the positive value n to the requested value in the
| |
| addCancel | back to summary |
|---|---|
| public static long addCancel(@NonNull AtomicLong requested, long n) Atomically adds the positive value n to the requested value in the
| |
| addCap | back to summary |
|---|---|
| public static long addCap(long a, long b) Adds two long values and caps the sum at
| |
| multiplyCap | back to summary |
|---|---|
| public static long multiplyCap(long a, long b) Multiplies two long values and caps the product at
| |
| produced | back to summary |
|---|---|
| public static long produced(@NonNull AtomicLong requested, long n) Atomically subtract the given number (positive, not validated) from the target field unless it contains
| |
| producedCancel | back to summary |
|---|---|
| public static long producedCancel(@NonNull AtomicLong requested, long n) Atomically subtract the given number (positive, not validated) from the target field if
it doesn't contain
| |