package org.apache.logging.log4j.core.async;

import java.util.concurrent.BlockingQueue;

import com.conversantmedia.util.concurrent.DisruptorBlockingQueue;
import org.apache.logging.log4j.core.config.Node;
import org.apache.logging.log4j.core.config.plugins.Plugin;
import org.apache.logging.log4j.core.config.plugins.PluginFactory;

/**
 * Factory for creating instances of {@link DisruptorBlockingQueue}.
 *
 * @since 2.7
 */
@Plugin(name = "DisruptorBlockingQueue", category = Node.CATEGORY, elementType = BlockingQueueFactory.ELEMENT_TYPE)
public class DisruptorBlockingQueueFactory<E> implements BlockingQueueFactory<E> {
    @Override
    public BlockingQueue<E> create(int capacity) {
        return new DisruptorBlockingQueue<>(capacity);
    }

    @PluginFactory
    public static <E> DisruptorBlockingQueueFactory<E> createFactory() {
        return new DisruptorBlockingQueueFactory<>();
    }
}

@@ -150,16 +150,71 @@
 gQueue;%0A
+import com.conversantmedia.util.concurrent.SpinPolicy;%0A
 import o
@@ -315,16 +315,85 @@
 Plugin;%0A
+import org.apache.logging.log4j.core.config.plugins.PluginAttribute;%0A
 import o
@@ -745,16 +745,177 @@
 ry%3CE%3E %7B%0A
+%0A    private final SpinPolicy spinPolicy;%0A%0A    private DisruptorBlockingQueueFactory(final SpinPolicy spinPolicy) %7B%0A        this.spinPolicy = spinPolicy;%0A    %7D%0A%0A
     @Ove
@@ -1023,16 +1023,28 @@
 capacity
+, spinPolicy
 );%0A    %7D
@@ -1133,16 +1133,123 @@
 Factory(
+%0A        @PluginAttribute(value = %22SpinPolicy%22, defaultString = %22WAITING%22) final SpinPolicy spinPolicy%0A    
 ) %7B%0A    
@@ -1295,16 +1295,26 @@
 ctory%3C%3E(
+spinPolicy
 );%0A    %7D

Make SpinPolicy configurable in DisruptorBlockingQueueFactory