C# Class Elders.Hystrix.NET.Util.LongAdder

This class is currently equivalent to AtomicLong. The original implementation derive from Striped64 to implement a counter with better throughput under high contention.
Afficher le fichier Open project: Elders/Hystrix.NET

Méthodes publiques

Méthode Description
Add ( long x ) : void

Increases the sum by the specified amount.

Decrement ( ) : void

Decrements the sum by 1.

Increment ( ) : void

Increments the sum by 1.

Reset ( ) : void

Sets the sum to 0.

Sum ( ) : long

Gets the sum.

SumThenReset ( ) : long

Gets the current sum and sets it to 0.

ToString ( ) : string

Gets the string representation of the sum.

Method Details

Add() public méthode

Increases the sum by the specified amount.
public Add ( long x ) : void
x long The number to add.
Résultat void

Decrement() public méthode

Decrements the sum by 1.
public Decrement ( ) : void
Résultat void

Increment() public méthode

Increments the sum by 1.
public Increment ( ) : void
Résultat void

Reset() public méthode

Sets the sum to 0.
public Reset ( ) : void
Résultat void

Sum() public méthode

Gets the sum.
public Sum ( ) : long
Résultat long

SumThenReset() public méthode

Gets the current sum and sets it to 0.
public SumThenReset ( ) : long
Résultat long

ToString() public méthode

Gets the string representation of the sum.
public ToString ( ) : string
Résultat string