Class DisruptorBlockingQueueFactory<E>
java.lang.Object
org.apache.logging.log4j.core.async.DisruptorBlockingQueueFactory<E>
- All Implemented Interfaces:
BlockingQueueFactory<E>
@Plugin(name="DisruptorBlockingQueue",
category="Core",
elementType="BlockingQueueFactory")
public class DisruptorBlockingQueueFactory<E>
extends Object
implements BlockingQueueFactory<E>
Factory for creating instances of
DisruptorBlockingQueue
.- Since:
- 2.7
-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.async.BlockingQueueFactory
ELEMENT_TYPE
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(int capacity) Creates a new BlockingQueue with the specified maximum capacity.static <E> DisruptorBlockingQueueFactory<E>
createFactory
(com.conversantmedia.util.concurrent.SpinPolicy spinPolicy)
-
Method Details
-
create
Description copied from interface:BlockingQueueFactory
Creates 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:
create
in interfaceBlockingQueueFactory<E>
- Parameters:
capacity
- maximum size of the queue if supported- Returns:
- a new BlockingQueue
-
createFactory
@PluginFactory public static <E> DisruptorBlockingQueueFactory<E> createFactory(@PluginAttribute(value="SpinPolicy",defaultString="WAITING") com.conversantmedia.util.concurrent.SpinPolicy spinPolicy)
-