Modifier and Type | Field and Description |
---|---|
static int |
SMALL_BUFFER_SIZE
A small default of available slots in a given container, compromise between intensive pipelines, small
subscribers numbers and memory use.
|
static int |
XS_BUFFER_SIZE
An allocation friendly default of available slots in a given container, e.g.
|
Modifier and Type | Method and Description |
---|---|
static int |
ceilingNextPowerOfTwo(int x)
Calculate the next power of 2, greater than or equal to x.
|
Queue<T> |
get() |
static <T> Supplier<Queue<T>> |
get(int batchSize) |
static boolean |
isPowerOfTwo(int x) |
static <T> Supplier<Queue<T>> |
one() |
static <T> Supplier<Queue<T>> |
small() |
static <T> Supplier<Queue<T>> |
unbounded() |
static <T> Supplier<Queue<T>> |
unbounded(int linkSize)
Returns an unbounded, linked-array-based Queue.
|
static <T> Supplier<Queue<T>> |
xs() |
public static final int XS_BUFFER_SIZE
public static final int SMALL_BUFFER_SIZE
public static int ceilingNextPowerOfTwo(int x)
From Hacker's Delight, Chapter 3, Harry S. Warren Jr.
x
- Value to round uppublic static boolean isPowerOfTwo(int x)
x
- the int to testpublic static <T> Supplier<Queue<T>> unbounded(int linkSize)