C# 클래스 OpenStory.Common.AtomicInteger

Represents a thread-safe Int32 value.
파일 보기 프로젝트 열기: shoftee/OpenStory 1 사용 예제들

공개 메소드들

메소드 설명
AtomicInteger ( int initialValue ) : System

Initializes a new instance of the AtomicInteger class with the given value.

CompareExchange ( int comparand, int newValue ) : int

Assigns a new value to the AtomicInteger if the current value is equal to a specified one, and returns the original value.

See Interlocked.CompareExchange(ref int,int,int) for details.

Decrement ( ) : int

Decrements the value of this AtomicInteger by one and returns the new value.

ExchangeWith ( int newValue ) : int

Exchanges the value of this AtomicInteger by with newValue and returns the original value.

Increment ( ) : int

Increments the value of this AtomicInteger by one and returns the new value.

ToInt32 ( ) : int

Extracts a Int32 from an AtomicInteger instance.

ToInt32 ( AtomicInteger atomicInteger ) : int

Extracts a Int32 from an instance of AtomicInteger.

메소드 상세

AtomicInteger() 공개 메소드

Initializes a new instance of the AtomicInteger class with the given value.
public AtomicInteger ( int initialValue ) : System
initialValue int The initial value.
리턴 System

CompareExchange() 공개 메소드

Assigns a new value to the AtomicInteger if the current value is equal to a specified one, and returns the original value.
See Interlocked.CompareExchange(ref int,int,int) for details.
public CompareExchange ( int comparand, int newValue ) : int
comparand int The value to compare for equality with.
newValue int The value to assign if the and comparand are equal.
리턴 int

Decrement() 공개 메소드

Decrements the value of this AtomicInteger by one and returns the new value.
public Decrement ( ) : int
리턴 int

ExchangeWith() 공개 메소드

Exchanges the value of this AtomicInteger by with newValue and returns the original value.
public ExchangeWith ( int newValue ) : int
newValue int The new value.
리턴 int

Increment() 공개 메소드

Increments the value of this AtomicInteger by one and returns the new value.
public Increment ( ) : int
리턴 int

ToInt32() 공개 메소드

Extracts a Int32 from an AtomicInteger instance.
public ToInt32 ( ) : int
리턴 int

ToInt32() 공개 정적인 메소드

Extracts a Int32 from an instance of AtomicInteger.
/// Thrown if is . ///
public static ToInt32 ( AtomicInteger atomicInteger ) : int
atomicInteger AtomicInteger The to extract the value of.
리턴 int