Click or drag to resize
Akka.NETAtomicCounter Class
An atomic 32 bit integer counter.
Inheritance Hierarchy
SystemObject
  Akka.Util.InternalAtomicCounter

Namespace:  Akka.Util.Internal
Assembly:  Akka (in Akka.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public class AtomicCounter : IAtomicCounter<int>

The AtomicCounter type exposes the following members.

Constructors
  NameDescription
Public methodAtomicCounter
Creates an instance of an AtomicCounter with a starting value of -1.
Public methodAtomicCounter(Int32)
Creates an instance of an AtomicCounter.
Top
Properties
  NameDescription
Public propertyCurrent
Retrieves the current value of the counter
Top
Methods
  NameDescription
Public methodAddAndGet
Adds the specified value to the counter and returns the new value.
Public methodCompareAndSet
Compares current counter value with provided expected value, and sets it to newValue if compared values where equal. Returns true if replacement has succeed.
Public methodDecrement
Decrements the counter and returns the next value
Public methodDecrementAndGet
Atomically decrements the counter by one.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
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 methodGetAndAdd
Returns the current value and adds the specified value to the counter.
Public methodGetAndDecrement
Atomically decrements the counter by one.
Public methodGetAndIncrement
Atomically increments the counter by one.
Public methodGetAndSet
Returns current counter value and sets a new value on it's place in one operation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIncrementAndGet
Atomically increments the counter by one.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNext
Increments the counter and returns the next value
Public methodReset
Resets the counter to zero.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
See Also