Class ArrayBlockingQueueFactory<E>

java.lang.Object
org.apache.logging.log4j.core.async.ArrayBlockingQueueFactory<E>
All Implemented Interfaces:
BlockingQueueFactory<E>

@Plugin(name="ArrayBlockingQueue", category="Core", elementType="BlockingQueueFactory") public class ArrayBlockingQueueFactory<E> extends Object implements BlockingQueueFactory<E>
Factory for creating instances of ArrayBlockingQueue.
Since:
2.7
  • Constructor Details

    • ArrayBlockingQueueFactory

      public ArrayBlockingQueueFactory()
  • Method Details

    • create

      public BlockingQueue<E> create(int capacity)
      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 interface BlockingQueueFactory<E>
      Parameters:
      capacity - maximum size of the queue if supported
      Returns:
      a new BlockingQueue
    • createFactory

      @PluginFactory public static <E> ArrayBlockingQueueFactory<E> createFactory()