@NotThreadSafe public interface DeltaCounter extends PNCounter, DeltaCount
changes in this value since last reset. It is
inspired by the conflict-free replicated data type (CRDT) P-N Counter. The semantics ensure the value converges toward the
global number of increments minus the number of decrements. The global total can be calculated by merging
all the replicated instances, without regard to order of merging.| Modifier and Type | Method and Description |
|---|---|
DeltaCounter |
decrement()
Decrement the counter and get the result.
|
DeltaCounter |
increment()
Increment the counter and get the result.
|
DeltaCounter |
merge(Count other)
Merge the supplied counter into this counter.
|
void |
reset()
Start a new interval and reset the
DeltaCount.getChanges() to initial values. |
decrementAndGet, getAndDecrementgetAndIncrement, incrementAndGetgetChanges, getPriorCount, hasChangesget, getDecrementgetIncrementDeltaCounter increment()
DeltaCounter decrement()
DeltaCounter merge(Count other)
void reset()
DeltaCount.getChanges() to initial values.Copyright © 2021 JBoss by Red Hat. All rights reserved.