Click or drag to resize
Akka.NETPNCounter Class
Implements a 'Increment/Decrement Counter' CRDT, also called a 'PN-Counter'. It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types. PN-Counters allow the counter to be incremented by tracking the increments (P) separate from the decrements (N). Both P and N are represented as two internal [[GCounter]]s. Merge is handled by merging the internal P and N counters. The value of the counter is the value of the P _counter minus the value of the N counter. This class is immutable, i.e. "modifying" methods return a new instance.
Inheritance Hierarchy
SystemObject
  Akka.DistributedDataPNCounter

Namespace:  Akka.DistributedData
Assembly:  Akka.DistributedData (in Akka.DistributedData.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
[SerializableAttribute]
public sealed class PNCounter : IReplicatedData<PNCounter>, 
	IReplicatedData, IRemovedNodePruning<PNCounter>, IReplicatedDataSerialization, IEquatable<PNCounter>

The PNCounter type exposes the following members.

Constructors
  NameDescription
Public methodPNCounter
Initializes a new instance of the PNCounter class
Public methodPNCounter(GCounter, GCounter)
Initializes a new instance of the PNCounter class
Top
Properties
  NameDescription
Public propertyDecrements
Public propertyIncrements
Public propertyValue
Top
Methods
  NameDescription
Public methodDecrement(Cluster, Int64)
Decrement the counter with the delta specified. If the delta is negative then it will increment instead of decrement.
Public methodDecrement(Cluster, BigInteger)
Decrement the counter with the delta specified. If the delta is negative then it will increment instead of decrement.
Public methodDecrement(UniqueAddress, Int64)
Decrement the counter with the delta specified. If the delta is negative then it will increment instead of decrement.
Public methodDecrement(UniqueAddress, BigInteger)
Decrement the counter with the delta specified. If the delta is negative then it will increment instead of decrement.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public methodEquals(PNCounter)
Indicates whether the current object is equal to another object of the same type.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIncrement(Cluster, Int64)
Increment the counter with the delta specified. If the delta is negative then it will decrement instead of increment.
Public methodIncrement(Cluster, BigInteger)
Increment the counter with the delta specified. If the delta is negative then it will decrement instead of increment.
Public methodIncrement(UniqueAddress, Int64)
Increment the counter with the delta specified. If the delta is negative then it will decrement instead of increment.
Public methodIncrement(UniqueAddress, BigInteger)
Increment the counter with the delta specified. If the delta is negative then it will decrement instead of increment.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge(IReplicatedData)
Public methodMerge(PNCounter)
Public methodNeedPruningFrom
Public methodPrune
Public methodPruningCleanup
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
Top
Extension Methods
See Also