C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Add() публичный Метод

Increases the sum by the specified amount.
public Add ( long x ) : void
x long The number to add.
Результат void

Decrement() публичный Метод

Decrements the sum by 1.
public Decrement ( ) : void
Результат void

Increment() публичный Метод

Increments the sum by 1.
public Increment ( ) : void
Результат void

Reset() публичный Метод

Sets the sum to 0.
public Reset ( ) : void
Результат void

Sum() публичный Метод

Gets the sum.
public Sum ( ) : long
Результат long

SumThenReset() публичный Метод

Gets the current sum and sets it to 0.
public SumThenReset ( ) : long
Результат long

ToString() публичный Метод

Gets the string representation of the sum.
public ToString ( ) : string
Результат string