Class PNCounterDictionary<TKey>
Inheritance
PNCounterDictionary<TKey>
Assembly: Akka.DistributedData.dll
Syntax
public sealed class PNCounterDictionary<TKey> : IDeltaReplicatedData<PNCounterDictionary<TKey>, ORDictionary<TKey, PNCounter>.IDeltaOperation>, IDeltaReplicatedData, IRemovedNodePruning<PNCounterDictionary<TKey>>, IRemovedNodePruning, IReplicatedData<PNCounterDictionary<TKey>>, IReplicatedData, IReplicatedDataSerialization, IEquatable<PNCounterDictionary<TKey>>, IEnumerable<KeyValuePair<TKey, BigInteger>>, IEnumerable
Type Parameters
Constructors
|
Edit this page
View Source
PNCounterDictionary(ORDictionary<TKey, PNCounter>)
Declaration
public PNCounterDictionary(ORDictionary<TKey, PNCounter> underlying)
Parameters
Fields
|
Edit this page
View Source
Empty
Declaration
public static readonly PNCounterDictionary<TKey> Empty
Field Value
Properties
|
Edit this page
View Source
Count
Declaration
public int Count { get; }
Property Value
|
Edit this page
View Source
Delta
The accumulated delta of mutator operations since previous
ResetDelta(). When the Akka.DistributedData.Replicator invokes the modify
function
of the Update 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 the Akka.DistributedData.Replicator with the Delta accessor. The
modify
function shall still return the full state in the same way as
IReplicatedData<T> without support for deltas.
Declaration
public ORDictionary<TKey, PNCounter>.IDeltaOperation Delta { get; }
Property Value
|
Edit this page
View Source
Entries
Declaration
public IImmutableDictionary<TKey, BigInteger> Entries { get; }
Property Value
|
Edit this page
View Source
IsEmpty
Declaration
public bool IsEmpty { get; }
Property Value
|
Edit this page
View Source
this[TKey]
Declaration
public BigInteger this[TKey key] { get; }
Parameters
Type |
Name |
Description |
TKey |
key |
|
Property Value
|
Edit this page
View Source
KeyType
Declaration
public Type KeyType { get; }
Property Value
|
Edit this page
View Source
Keys
Declaration
public IEnumerable<TKey> Keys { get; }
Property Value
|
Edit this page
View Source
ModifiedByNodes
The nodes that have changed the state for this data
and would need pruning when such node is no longer part
of the cluster.
Declaration
public ImmutableHashSet<UniqueAddress> ModifiedByNodes { get; }
Property Value
|
Edit this page
View Source
Values
Declaration
public IEnumerable<BigInteger> Values { get; }
Property Value
Methods
|
Edit this page
View Source
ContainsKey(TKey)
Declaration
public bool ContainsKey(TKey key)
Parameters
Type |
Name |
Description |
TKey |
key |
|
Returns
|
Edit this page
View Source
Decrement(Cluster, TKey, long)
Decrement the counter with the delta specified.
If the delta is negative then it will increment instead of decrement.
Declaration
public PNCounterDictionary<TKey> Decrement(Cluster node, TKey key, long delta = 1)
Parameters
Returns
|
Edit this page
View Source
Decrement(UniqueAddress, TKey, long)
Decrement the counter with the delta specified.
If the delta is negative then it will increment instead of decrement.
Declaration
public PNCounterDictionary<TKey> Decrement(UniqueAddress node, TKey key, long delta = 1)
Parameters
Returns
|
Edit this page
View Source
Equals(PNCounterDictionary<TKey>)
Declaration
public bool Equals(PNCounterDictionary<TKey> other)
Parameters
Returns
|
Edit this page
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetEnumerator()
Declaration
public IEnumerator<KeyValuePair<TKey, BigInteger>> GetEnumerator()
Returns
|
Edit this page
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
Increment(Cluster, TKey, long)
Increment the counter with the delta specified.
If the delta is negative then it will decrement instead of increment.
Declaration
public PNCounterDictionary<TKey> Increment(Cluster node, TKey key, long delta = 1)
Parameters
Returns
|
Edit this page
View Source
Increment(UniqueAddress, TKey, long)
Increment the counter with the delta specified.
If the delta is negative then it will decrement instead of increment.
Declaration
public PNCounterDictionary<TKey> Increment(UniqueAddress node, TKey key, long delta = 1)
Parameters
Returns
|
Edit this page
View Source
Merge(IReplicatedData)
Declaration
public IReplicatedData Merge(IReplicatedData other)
Parameters
Returns
|
Edit this page
View Source
Merge(PNCounterDictionary<TKey>)
Declaration
public PNCounterDictionary<TKey> Merge(PNCounterDictionary<TKey> other)
Parameters
Returns
|
Edit this page
View Source
MergeDelta(IDeltaOperation)
Declaration
public PNCounterDictionary<TKey> MergeDelta(ORDictionary<TKey, PNCounter>.IDeltaOperation delta)
Parameters
Returns
|
Edit this page
View Source
NeedPruningFrom(UniqueAddress)
Does it have any state changes from a specific node,
which has been removed from the cluster.
Declaration
public bool NeedPruningFrom(UniqueAddress removedNode)
Parameters
Returns
|
Edit this page
View Source
Prune(UniqueAddress, UniqueAddress)
When the removedNode
node has been removed from the cluster the state
changes from that node will be pruned by collapsing the data entries
to another node.
Declaration
public PNCounterDictionary<TKey> Prune(UniqueAddress removedNode, UniqueAddress collapseInto)
Parameters
Returns
|
Edit this page
View Source
PruningCleanup(UniqueAddress)
Remove data entries from a node that has been removed from the cluster
and already been pruned.
Declaration
public PNCounterDictionary<TKey> PruningCleanup(UniqueAddress removedNode)
Parameters
Returns
|
Edit this page
View Source
Remove(Cluster, TKey)
Removes an entry from the map.
Note that if there is a conflicting update on another node the entry will
not be removed after merge.
Declaration
public PNCounterDictionary<TKey> Remove(Cluster node, TKey key)
Parameters
Type |
Name |
Description |
Cluster |
node |
|
TKey |
key |
|
Returns
|
Edit this page
View Source
Remove(UniqueAddress, TKey)
Removes an entry from the map.
Note that if there is a conflicting update on another node the entry will
not be removed after merge.
Declaration
public PNCounterDictionary<TKey> Remove(UniqueAddress node, TKey key)
Parameters
Returns
|
Edit this page
View Source
ResetDelta()
Reset collection of deltas from mutator operations. When the Akka.DistributedData.Replicator
invokes the modify
function of the Update 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
the Akka.DistributedData.Replicator with the Delta accessor. When the
Akka.DistributedData.Replicator has grabbed the Delta it will invoke this method
to get a clean data instance without the delta.
Declaration
public PNCounterDictionary<TKey> ResetDelta()
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
TryGetValue(TKey, out BigInteger)
Tries to return a value under provided key
, if such entry exists.
Declaration
public bool TryGetValue(TKey key, out BigInteger value)
Parameters
Returns
Implements
Extension Methods