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.
Mostrar archivo Open project: Elders/Hystrix.NET

Public Methods

Method 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 method

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

Decrement() public method

Decrements the sum by 1.
public Decrement ( ) : void
return void

Increment() public method

Increments the sum by 1.
public Increment ( ) : void
return void

Reset() public method

Sets the sum to 0.
public Reset ( ) : void
return void

Sum() public method

Gets the sum.
public Sum ( ) : long
return long

SumThenReset() public method

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

ToString() public method

Gets the string representation of the sum.
public ToString ( ) : string
return string