Demand is the aggregated number of elements requested by a Subscriber which is yet to be delivered (fulfilled) by the Publisher.
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicLong |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: a valuem (0 <= m <= n) this demand has been
actually decreased bydecrement n)> 0Tries to decrease this demand by the specified positive value. |
| public long | |
| public boolean | Returns: true iff prior to this operation this demand was fulfilledincrement n)> 0Increases this demand by the specified positive value. |
| public boolean | Returns: true if the demand was increased, false otherwise.Increases this demand by 1 but only if it is fulfilled. |
| public boolean | |
| public void | |
| public String | |
| public boolean | Returns: true iff this demand has been decreased by 1Tries to decrease this demand by |
| val | back to summary |
|---|---|
| private final AtomicLong val | |
| Demand | back to summary |
|---|---|
| public Demand() | |
| decreaseAndGet | back to summary |
|---|---|
| public long decreaseAndGet(long n) Tries to decrease this demand by the specified positive value. The actual value this demand has been decreased by might be less than
| |
| get | back to summary |
|---|---|
| public long get() Returns the current value of this demand.
| |
| increase | back to summary |
|---|---|
| public boolean increase(long n) Increases this demand by the specified positive value.
| |
| increaseIfFulfilled | back to summary |
|---|---|
| public boolean increaseIfFulfilled() Increases this demand by 1 but only if it is fulfilled.
| |
| isFulfilled | back to summary |
|---|---|
public boolean isFulfilled()
| |
| reset | back to summary |
|---|---|
| public void reset() Resets this object to its initial state. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| tryDecrement | back to summary |
|---|---|
| public boolean tryDecrement() Tries to decrease this demand by
| |