@NotThreadSafe class StateBasedPNDeltaCounter extends StateBasedPNCounter implements DeltaCounter
| Modifier | Constructor and Description |
|---|---|
protected |
StateBasedPNDeltaCounter() |
protected |
StateBasedPNDeltaCounter(long totalAdds,
long totalRemoves,
long recentAdds,
long recentRemoves) |
| Modifier and Type | Method and Description |
|---|---|
DeltaCounter |
decrement()
Decrement the counter and get the result.
|
long |
decrementAndGet()
Decrement the counter and get the result.
|
long |
getAndDecrement()
Decrement the counter and get the result.
|
long |
getAndIncrement()
Increment the counter and get the result.
|
PNCount |
getChanges()
Get the changes in the current value during the last interval.
|
Count |
getPriorCount()
Get the value of this count prior to the
changes. |
boolean |
hasChanges()
Determine if there are any changes in this count.
|
DeltaCounter |
increment()
Increment the counter and get the result.
|
long |
incrementAndGet()
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. |
String |
toString() |
get, getDecrement, getIncrementclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitget, getDecrementgetIncrementprivate PNCounter delta
protected StateBasedPNDeltaCounter()
protected StateBasedPNDeltaCounter(long totalAdds,
long totalRemoves,
long recentAdds,
long recentRemoves)
public DeltaCounter increment()
PNCounterincrement in interface DeltaCounterincrement in interface GCounterincrement in interface PNCounterincrement in class StateBasedPNCounterpublic DeltaCounter decrement()
PNCounterdecrement in interface DeltaCounterdecrement in interface PNCounterdecrement in class StateBasedPNCounterpublic long incrementAndGet()
GCounterincrementAndGet in interface GCounterincrementAndGet in class StateBasedPNCounterpublic long decrementAndGet()
PNCounterdecrementAndGet in interface PNCounterdecrementAndGet in class StateBasedPNCounterpublic long getAndIncrement()
GCountergetAndIncrement in interface GCountergetAndIncrement in class StateBasedPNCounterpublic long getAndDecrement()
PNCountergetAndDecrement in interface PNCountergetAndDecrement in class StateBasedPNCounterpublic PNCount getChanges()
DeltaCountgetChanges in interface DeltaCountpublic boolean hasChanges()
DeltaCounthasChanges in interface DeltaCounttrue if there are non-zero changes, or false otherwisepublic Count getPriorCount()
DeltaCountchanges.getPriorCount in interface DeltaCountpublic void reset()
DeltaCounterDeltaCount.getChanges() to initial values.reset in interface DeltaCounterpublic DeltaCounter merge(Count other)
PNCountermerge in interface DeltaCountermerge in interface GCountermerge in interface PNCountermerge in class StateBasedPNCounterother - the other counter to merge into this one; may be nullpublic String toString()
toString in class StateBasedPNCounterCopyright © 2021 JBoss by Red Hat. All rights reserved.