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.
파일 보기 프로젝트 열기: Elders/Hystrix.NET

공개 메소드들

메소드 설명
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