Package io.lettuce.core.internal
Class LettuceFactories
- java.lang.Object
-
- io.lettuce.core.internal.LettuceFactories
-
public class LettuceFactories extends Object
This class is part of the internal API and may change without further notice.- Since:
- 4.2
- Author:
- Mark Paluch
-
-
Constructor Summary
Constructors Constructor Description LettuceFactories()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> LinkedBlockingQueue<T>
newBlockingQueue()
Creates a newBlockingQueue
.static <T> Queue<T>
newConcurrentQueue(int maxSize)
Creates a new, optionally bounded,Queue
that does not require external synchronization.static <T> Deque<T>
newSpScQueue()
Creates a newQueue
for single producer/single consumer.
-
-
-
Method Detail
-
newConcurrentQueue
public static <T> Queue<T> newConcurrentQueue(int maxSize)
Creates a new, optionally bounded,Queue
that does not require external synchronization.- Parameters:
maxSize
- queue size. IfInteger.MAX_VALUE
, then creates anunbounded queue
.- Returns:
- a new, empty
Queue
.
-
newSpScQueue
public static <T> Deque<T> newSpScQueue()
Creates a newQueue
for single producer/single consumer.- Returns:
- a new, empty
ArrayDeque
.
-
newBlockingQueue
public static <T> LinkedBlockingQueue<T> newBlockingQueue()
Creates a newBlockingQueue
.- Returns:
- a new, empty
BlockingQueue
.
-
-