public class QueueFactories
extends java.lang.Object
Constructor and Description |
---|
QueueFactories() |
Modifier and Type | Method and Description |
---|---|
static <T> QueueFactory<T> |
boundedNonBlockingQueue(int queueSize)
Creates an async.Queue backed by an Agrona ManyToOneConcurrentArrayQueue bounded by specified queueSize
Wait strategy used is NoWaitRetry by default for both Consumers and Producers
(both Consumers and Producers will repeatedly retry until successful).
|
static <T> QueueFactory<T> |
boundedQueue(int queueSize) |
static <T> QueueFactory<T> |
singleWriterboundedNonBlockingQueue(int queueSize)
Creates an async.Queue backed by an Agrona OneToOneConcurrentArrayQueue bounded by specified queueSize
Wait strategy used is NoWaitRetry by default for both Consumers and Producers
(both Consumers and Producers will repeatedly retry until successful).
|
static <T> QueueFactory<T> |
synchronousQueue() |
static <T> QueueFactory<T> |
unboundedNonBlockingQueue()
Creates an async.Queue backed by a JDK Wait Free unbounded ConcurrentLinkedQueue
Wait strategy used is NoWaitRetry by default for both Consumers and Producers
(both Consumers and Producers will repeatedly retry until successful).
|
static <T> QueueFactory<T> |
unboundedQueue() |
public static <T> QueueFactory<T> boundedQueue(int queueSize)
public static <T> QueueFactory<T> unboundedQueue()
public static <T> QueueFactory<T> unboundedNonBlockingQueue()
queue.withConsumerWaitStrategy(new DirectWaitStrategy())
.withProducerWaitStrategy(new YieldWait());
public static <T> QueueFactory<T> boundedNonBlockingQueue(int queueSize)
queue.withConsumerWaitStrategy(new DirectWaitStrategy())
.withProducerWaitStrategy(new YieldWait());
queueSize
- upper bound for Queuepublic static <T> QueueFactory<T> singleWriterboundedNonBlockingQueue(int queueSize)
queue.withConsumerWaitStrategy(new DirectWaitStrategy())
.withProducerWaitStrategy(new YieldWait());
queueSize
- public static <T> QueueFactory<T> synchronousQueue()