Click or drag to resize
Akka.NETGCounter Class
Implements a 'Growing Counter' CRDT, also called a 'G-Counter'. It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types. A G-Counter is a increment-only counter (inspired by vector clocks) in which only increment and merge are possible. Incrementing the counter adds 1 to the count for the current node. Divergent histories are resolved by taking the maximum count for each node (like a vector clock merge). The value of the counter is the sum of all node counts. This class is immutable, i.e. "modifying" methods return a new instance.
Inheritance Hierarchy
SystemObject
  Akka.DistributedDataFastMergeGCounter
    Akka.DistributedDataGCounter

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

The GCounter type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyStatic memberEmpty
TBD
Public propertyState
TBD
Public propertyValue
Current total value of the counter.
Top
Methods
  NameDescription
Protected methodAssignAncestor
INTERNAL API: should be called from "updating" methods
(Inherited from FastMergeT.)
Protected methodClearAncestor
INTERNAL API: should be called from merge
(Inherited from FastMergeT.)
Public methodCompareTo(Object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodCompareTo(GCounter)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides ObjectEquals(Object).)
Public methodEquals(GCounter)
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)
Increment the counter by 1.
Public methodIncrement(UniqueAddress)
Increment the counter by 1.
Public methodIncrement(Cluster, BigInteger)
Increment the counter with the delta specified. The delta must be zero or positive.
Public methodIncrement(Cluster, UInt64)
Increment the counter with the delta specified. The delta must be zero or positive.
Public methodIncrement(UniqueAddress, BigInteger)
Increment the counter with the delta specified. The delta must be zero or positive.
Public methodIncrement(UniqueAddress, UInt64)
Increment the counter with the delta specified. The delta must be zero or positive.
Protected methodIsAncestorOf
INTERNAL API: should be used from merge
(Inherited from FastMergeT.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge(GCounter)
TBD
(Overrides FastMergeTMerge(T).)
Public methodMerge(IReplicatedData)
TBD
(Inherited from FastMergeT.)
Public methodNeedPruningFrom
TBD
Public methodPrune
TBD
Public methodPruningCleanup
TBD
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Operators
Extension Methods
See Also