Class JCToolsBlockingQueueFactory<E>
- java.lang.Object
-
- org.apache.logging.log4j.core.async.JCToolsBlockingQueueFactory<E>
-
- All Implemented Interfaces:
BlockingQueueFactory<E>
@Plugin(name="JCToolsBlockingQueue", category="Core", elementType="BlockingQueueFactory") public class JCToolsBlockingQueueFactory<E> extends java.lang.Object implements BlockingQueueFactory<E>
Factory for creating instances of BlockingQueues backed by JCToolsMpscArrayQueue.- Since:
- 2.7
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interfaceJCToolsBlockingQueueFactory.Idleprivate static classJCToolsBlockingQueueFactory.MpscBlockingQueue<E>BlockingQueue wrapper for JCTools multiple producer single consumer array queue.static classJCToolsBlockingQueueFactory.WaitStrategy
-
Field Summary
Fields Modifier and Type Field Description private JCToolsBlockingQueueFactory.WaitStrategywaitStrategy-
Fields inherited from interface org.apache.logging.log4j.core.async.BlockingQueueFactory
ELEMENT_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateJCToolsBlockingQueueFactory(JCToolsBlockingQueueFactory.WaitStrategy waitStrategy)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.BlockingQueue<E>create(int capacity)Creates a new BlockingQueue with the specified maximum capacity.static <E> JCToolsBlockingQueueFactory<E>createFactory(JCToolsBlockingQueueFactory.WaitStrategy waitStrategy)
-
-
-
Field Detail
-
waitStrategy
private final JCToolsBlockingQueueFactory.WaitStrategy waitStrategy
-
-
Constructor Detail
-
JCToolsBlockingQueueFactory
private JCToolsBlockingQueueFactory(JCToolsBlockingQueueFactory.WaitStrategy waitStrategy)
-
-
Method Detail
-
create
public java.util.concurrent.BlockingQueue<E> create(int capacity)
Description copied from interface:BlockingQueueFactoryCreates a new BlockingQueue with the specified maximum capacity. Note that not all implementations of BlockingQueue support a bounded capacity in which case the value is ignored.- Specified by:
createin interfaceBlockingQueueFactory<E>- Parameters:
capacity- maximum size of the queue if supported- Returns:
- a new BlockingQueue
-
createFactory
@PluginFactory public static <E> JCToolsBlockingQueueFactory<E> createFactory(@PluginAttribute(value="WaitStrategy",defaultString="PARK") JCToolsBlockingQueueFactory.WaitStrategy waitStrategy)
-
-