Package akka.cluster.ddata
Class PNCounter
- java.lang.Object
-
- akka.cluster.ddata.PNCounter
-
- All Implemented Interfaces:
DeltaReplicatedData
,RemovedNodePruning
,ReplicatedData
,ReplicatedDataSerialization
,ReplicatedDelta
,java.io.Serializable
,scala.Serializable
public final class PNCounter extends java.lang.Object implements DeltaReplicatedData, ReplicatedDelta, ReplicatedDataSerialization, RemovedNodePruning
Scala API: Current total value of the counter.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PNCounter
$colon$plus(long n, SelfUniqueAddress node)
Increment the counter with the deltan
specified.PNCounter
$colon$plus(scala.math.BigInt n, SelfUniqueAddress node)
Increment the counter with the deltan
specified.PNCounter
$minus(long n, Cluster node)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead.PNCounter
$minus(scala.math.BigInt n, Cluster node)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead.PNCounter
$plus(long n, Cluster node)
Deprecated.Use `:+` that takes a `SelfUniqueAddress` parameter instead.PNCounter
$plus(scala.math.BigInt n, Cluster node)
Deprecated.Use `:+` that takes a `SelfUniqueAddress` parameter instead.static PNCounter
apply()
PNCounter
change(UniqueAddress key, scala.math.BigInt n)
Internal APIstatic PNCounter
create()
Java APIPNCounter
decrement(long n, SelfUniqueAddress node)
Decrement the counter with the deltan
specified.PNCounter
decrement(Cluster node, long n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead.PNCounter
decrement(Cluster node, java.math.BigInteger n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead.PNCounter
decrement(Cluster node, scala.math.BigInt n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead.PNCounter
decrement(SelfUniqueAddress node, long n)
Decrement the counter with the deltan
specified.PNCounter
decrement(SelfUniqueAddress node, java.math.BigInteger n)
Java API: Decrement the counter with the deltan
specified.PNCounter
decrement(SelfUniqueAddress node, scala.math.BigInt n)
Scala API: Decrement the counter with the deltan
specified.PNCounter
decrement(UniqueAddress key)
Internal APIPNCounter
decrement(UniqueAddress key, scala.math.BigInt n)
Internal APIPNCounter
decrement(scala.math.BigInt n, SelfUniqueAddress node)
Decrement the counter with the deltan
specified.long
decrement$default$2()
GCounter
decrements()
scala.Option<PNCounter>
delta()
The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta()
.static PNCounter
empty()
boolean
equals(java.lang.Object o)
java.math.BigInteger
getValue()
Java API: Current total value of the counter.int
hashCode()
PNCounter
increment(long n, SelfUniqueAddress node)
Scala API: Increment the counter with the deltan
specified.PNCounter
increment(Cluster node, long n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead.PNCounter
increment(Cluster node, java.math.BigInteger n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead.PNCounter
increment(Cluster node, scala.math.BigInt n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead.PNCounter
increment(SelfUniqueAddress node, long n)
Java API: Increment the counter with the deltan
specified.PNCounter
increment(SelfUniqueAddress node, java.math.BigInteger n)
Java API: Increment the counter with the deltan
specified.PNCounter
increment(UniqueAddress key)
Internal APIPNCounter
increment(UniqueAddress key, scala.math.BigInt n)
Internal APIPNCounter
increment(scala.math.BigInt n, SelfUniqueAddress node)
Increment the counter with the deltan
specified.long
increment$default$2()
GCounter
increments()
PNCounter
merge(PNCounter that)
PNCounter
mergeDelta(PNCounter thatDelta)
scala.collection.immutable.Set<UniqueAddress>
modifiedByNodes()
boolean
needPruningFrom(UniqueAddress removedNode)
Does it have any state changes from a specific node, which has been removed from the cluster.PNCounter
prune(UniqueAddress removedNode, UniqueAddress collapseInto)
When theremoved
node has been removed from the cluster the state changes from that node will be pruned by collapsing the data entries to another node.PNCounter
pruningCleanup(UniqueAddress removedNode)
Remove data entries from a node that has been removed from the cluster and already been pruned.PNCounter
resetDelta()
Reset collection of deltas from mutator operations.java.lang.String
toString()
static scala.Option<scala.math.BigInt>
unapply(PNCounter c)
Extract theGCounter.value()
.scala.math.BigInt
value()
Scala API: Current total value of the counter.PNCounter
zero()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.cluster.ddata.DeltaReplicatedData
mergeDelta
-
Methods inherited from interface akka.cluster.ddata.ReplicatedData
merge
-
-
-
-
Method Detail
-
empty
public static PNCounter empty()
-
apply
public static PNCounter apply()
-
create
public static PNCounter create()
Java API- Returns:
- (undocumented)
-
unapply
public static scala.Option<scala.math.BigInt> unapply(PNCounter c)
Extract theGCounter.value()
.- Parameters:
c
- (undocumented)- Returns:
- (undocumented)
-
increments
public GCounter increments()
-
decrements
public GCounter decrements()
-
value
public scala.math.BigInt value()
Scala API: Current total value of the counter.- Returns:
- (undocumented)
-
getValue
public java.math.BigInteger getValue()
Java API: Current total value of the counter.- Returns:
- (undocumented)
-
$colon$plus
public PNCounter $colon$plus(long n, SelfUniqueAddress node)
Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
$plus
public PNCounter $plus(long n, Cluster node)
Deprecated.Use `:+` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
$colon$plus
public PNCounter $colon$plus(scala.math.BigInt n, SelfUniqueAddress node)
Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
$plus
public PNCounter $plus(scala.math.BigInt n, Cluster node)
Deprecated.Use `:+` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
increment
public PNCounter increment(long n, SelfUniqueAddress node)
Scala API: Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
increment
public PNCounter increment(Cluster node, long n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
increment
public PNCounter increment(scala.math.BigInt n, SelfUniqueAddress node)
Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
increment
public PNCounter increment(Cluster node, scala.math.BigInt n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
increment
public PNCounter increment(SelfUniqueAddress node, java.math.BigInteger n)
Java API: Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
node
- (undocumented)n
- (undocumented)- Returns:
- (undocumented)
-
increment
public PNCounter increment(SelfUniqueAddress node, long n)
Java API: Increment the counter with the deltan
specified. If the delta is negative then it will decrement instead of increment.- Parameters:
node
- (undocumented)n
- (undocumented)- Returns:
- (undocumented)
-
increment
public PNCounter increment(Cluster node, java.math.BigInteger n)
Deprecated.Use `increment` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
decrement
public PNCounter decrement(long n, SelfUniqueAddress node)
Decrement the counter with the deltan
specified. If the delta is negative then it will increment instead of decrement.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
$minus
public PNCounter $minus(long n, Cluster node)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
decrement
public PNCounter decrement(scala.math.BigInt n, SelfUniqueAddress node)
Decrement the counter with the deltan
specified. If the delta is negative then it will increment instead of decrement.- Parameters:
n
- (undocumented)node
- (undocumented)- Returns:
- (undocumented)
-
$minus
public PNCounter $minus(scala.math.BigInt n, Cluster node)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
decrement
public PNCounter decrement(SelfUniqueAddress node, long n)
Decrement the counter with the deltan
specified. If the deltan
is negative then it will increment instead of decrement.- Parameters:
node
- (undocumented)n
- (undocumented)- Returns:
- (undocumented)
-
decrement
public PNCounter decrement(Cluster node, long n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
decrement
public PNCounter decrement(SelfUniqueAddress node, scala.math.BigInt n)
Scala API: Decrement the counter with the deltan
specified. If the deltan
is negative then it will increment instead of decrement.- Parameters:
node
- (undocumented)n
- (undocumented)- Returns:
- (undocumented)
-
decrement
public PNCounter decrement(Cluster node, scala.math.BigInt n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
decrement
public PNCounter decrement(SelfUniqueAddress node, java.math.BigInteger n)
Java API: Decrement the counter with the deltan
specified. If the deltan
is negative then it will increment instead of decrement.- Parameters:
node
- (undocumented)n
- (undocumented)- Returns:
- (undocumented)
-
decrement
public PNCounter decrement(Cluster node, java.math.BigInteger n)
Deprecated.Use `decrement` that takes a `SelfUniqueAddress` parameter instead. Since 2.5.20.
-
increment
public PNCounter increment(UniqueAddress key, scala.math.BigInt n)
Internal API
-
increment
public PNCounter increment(UniqueAddress key)
Internal API
-
increment$default$2
public long increment$default$2()
-
decrement
public PNCounter decrement(UniqueAddress key, scala.math.BigInt n)
Internal API
-
decrement
public PNCounter decrement(UniqueAddress key)
Internal API
-
decrement$default$2
public long decrement$default$2()
-
change
public PNCounter change(UniqueAddress key, scala.math.BigInt n)
Internal API
-
delta
public scala.Option<PNCounter> delta()
Description copied from interface:DeltaReplicatedData
The accumulated delta of mutator operations since previousDeltaReplicatedData.resetDelta()
. When theReplicator
invokes themodify
function of theUpdate
message and the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicator
with theDeltaReplicatedData.delta()
accessor. Themodify
function shall still return the full state in the same way asReplicatedData
without support for deltas.- Specified by:
delta
in interfaceDeltaReplicatedData
- Returns:
- (undocumented)
-
zero
public PNCounter zero()
- Specified by:
zero
in interfaceReplicatedDelta
-
resetDelta
public PNCounter resetDelta()
Description copied from interface:DeltaReplicatedData
Reset collection of deltas from mutator operations. When theReplicator
invokes themodify
function of theUpdate
message the delta is always "reset" and when the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for theReplicator
with theDeltaReplicatedData.delta()
accessor. When theReplicator
has grabbed thedelta
it will invoke this method to get a clean data instance without the delta.- Specified by:
resetDelta
in interfaceDeltaReplicatedData
- Returns:
- (undocumented)
-
modifiedByNodes
public scala.collection.immutable.Set<UniqueAddress> modifiedByNodes()
- Specified by:
modifiedByNodes
in interfaceRemovedNodePruning
-
needPruningFrom
public boolean needPruningFrom(UniqueAddress removedNode)
Description copied from interface:RemovedNodePruning
Does it have any state changes from a specific node, which has been removed from the cluster.- Specified by:
needPruningFrom
in interfaceRemovedNodePruning
- Parameters:
removedNode
- (undocumented)- Returns:
- (undocumented)
-
prune
public PNCounter prune(UniqueAddress removedNode, UniqueAddress collapseInto)
Description copied from interface:RemovedNodePruning
When theremoved
node has been removed from the cluster the state changes from that node will be pruned by collapsing the data entries to another node.- Specified by:
prune
in interfaceRemovedNodePruning
- Parameters:
removedNode
- (undocumented)collapseInto
- (undocumented)- Returns:
- (undocumented)
-
pruningCleanup
public PNCounter pruningCleanup(UniqueAddress removedNode)
Description copied from interface:RemovedNodePruning
Remove data entries from a node that has been removed from the cluster and already been pruned.- Specified by:
pruningCleanup
in interfaceRemovedNodePruning
- Parameters:
removedNode
- (undocumented)- Returns:
- (undocumented)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-