public final class CRDT extends Object
Modifier | Constructor and Description |
---|---|
private |
CRDT() |
Modifier and Type | Method and Description |
---|---|
static DeltaCounter |
newDeltaCounter()
Create a new CRDT positive and negative (PN) counter that records how much the value has changed since last reset.
|
static DeltaCounter |
newDeltaCounter(DeltaCount count)
Create a new CRDT positive and negative (PN) counter that records how much the value has changed since last reset.
|
static DeltaCounter |
newDeltaCounter(long totalAdds,
long totalRemoves,
long recentAdds,
long recentRemoves)
Create a new CRDT positive and negative (PN) counter that records how much the value has changed since last reset.
|
static GCounter |
newGCounter()
Create a new CRDT grow-only (G) counter.
|
static GCounter |
newGCounter(long adds)
Create a new CRDT grow-only (G) counter pre-populated with the given value.
|
static PNCounter |
newPNCounter()
Create a new CRDT positive and negative (PN) counter.
|
static PNCounter |
newPNCounter(long adds,
long removes)
Create a new CRDT positive and negative (PN) counter pre-populated with the given values.
|
public static GCounter newGCounter()
public static GCounter newGCounter(long adds)
adds
- the number of addspublic static PNCounter newPNCounter()
public static PNCounter newPNCounter(long adds, long removes)
adds
- the number of addsremoves
- the number of removespublic static DeltaCounter newDeltaCounter()
public static DeltaCounter newDeltaCounter(long totalAdds, long totalRemoves, long recentAdds, long recentRemoves)
totalAdds
- the total number of addstotalRemoves
- the total number of removesrecentAdds
- the recent number of adds since last DeltaCounter.reset()
recentRemoves
- the recent number of removes since last DeltaCounter.reset()
public static DeltaCounter newDeltaCounter(DeltaCount count)
count
- the DeltaCount
instance that should be used to pre-populate the new counter; may be nullCopyright © 2020 JBoss by Red Hat. All rights reserved.