|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lmax.disruptor.Util
public final class Util
Set of common functions used by the Disruptor
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static int |
ceilingNextPowerOfTwo(int x)
Calculate the next power of 2, greater than or equal to x. |
static long |
getMinimumSequence(Consumer[] consumers)
Get the minimum sequence from an array of Consumer s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static int ceilingNextPowerOfTwo(int x)
From Hacker's Delight, Chapter 3, Harry S. Warren Jr.
x
- Value to round up
public static long getMinimumSequence(Consumer[] consumers)
Consumer
s.
consumers
- to compare.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |