Add LinkedTransferQueueFactory

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/4613d509
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/4613d509
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/4613d509

Branch: refs/heads/master
Commit: 4613d50908b8a2ea347c966af69877a184f436f9
Parents: 28dd979
Author: Matt Sicker <boa...@gmail.com>
Authored: Wed Jun 15 22:39:22 2016 -0500
Committer: Matt Sicker <boa...@gmail.com>
Committed: Wed Jun 15 22:39:22 2016 -0500

----------------------------------------------------------------------
 .../core/util/LinkedTransferQueueFactory.java   | 33 ++++++++++++++++++++
 1 file changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4613d509/log4j-core/src/main/java/org/apache/logging/log4j/core/util/LinkedTransferQueueFactory.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/LinkedTransferQueueFactory.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/LinkedTransferQueueFactory.java
new file mode 100644
index 0000000..4b29077
--- /dev/null
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/LinkedTransferQueueFactory.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+
+package org.apache.logging.log4j.core.util;
+
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedTransferQueue;
+
+/**
+ * Factory for creating instances of {@link LinkedTransferQueue}.
+ *
+ * @since 2.7
+ */
+public class LinkedTransferQueueFactory<E> implements BlockingQueueFactory<E> {
+    @Override
+    public BlockingQueue<E> create(int capacity) {
+        return new LinkedTransferQueue<>();
+    }
+}

Reply via email to