C# 클래스 Disruptor.Util

Set of common functions used by the Disruptor
파일 보기 프로젝트 열기: disruptor-net/Disruptor-net

공개 메소드들

메소드 설명
CeilingNextPowerOfTwo ( this x ) : int

Calculate the next power of 2, greater than or equal to x.

GetMinimumSequence ( ISequence sequences, long minimum = long.MaxValue ) : long

Get the minimum sequence from an array of Sequences.

GetSequencesFor ( ) : ISequence[]

Get an array of Sequences for the passed IEventProcessors

IsPowerOf2 ( this x ) : bool

Test whether a given integer is a power of 2

Log2 ( int i ) : int

Calculate the log base 2 of the supplied integer, essentially reports the location of the highest bit.

메소드 상세

CeilingNextPowerOfTwo() 공개 정적인 메소드

Calculate the next power of 2, greater than or equal to x.
public static CeilingNextPowerOfTwo ( this x ) : int
x this Value to round up
리턴 int

GetMinimumSequence() 공개 정적인 메소드

Get the minimum sequence from an array of Sequences.
public static GetMinimumSequence ( ISequence sequences, long minimum = long.MaxValue ) : long
sequences ISequence sequences to compare.
minimum long an initial default minimum. If the array is empty this value will returned.
리턴 long

GetSequencesFor() 공개 정적인 메소드

Get an array of Sequences for the passed IEventProcessors
public static GetSequencesFor ( ) : ISequence[]
리턴 ISequence[]

IsPowerOf2() 공개 정적인 메소드

Test whether a given integer is a power of 2
public static IsPowerOf2 ( this x ) : bool
x this
리턴 bool

Log2() 공개 정적인 메소드

Calculate the log base 2 of the supplied integer, essentially reports the location of the highest bit.
public static Log2 ( int i ) : int
i int Value to calculate log2 for.
리턴 int