You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2023/11/11 20:29:32 UTC

(logging-log4j2) branch main updated: Update `com.lmax:disruptor` to version `4.0.0`

This is an automated email from the ASF dual-hosted git repository.

mattsicker pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/main by this push:
     new 9dcb10bf30 Update `com.lmax:disruptor` to version `4.0.0`
9dcb10bf30 is described below

commit 9dcb10bf300432b353cb793a81d1202bce36ef77
Author: Matt Sicker <ma...@apache.org>
AuthorDate: Sat Nov 11 14:29:18 2023 -0600

    Update `com.lmax:disruptor` to version `4.0.0`
    
    Signed-off-by: Matt Sicker <ma...@apache.org>
---
 .../logging/log4j/core/async/AsyncLoggerConfigDisruptor.java   |  4 ++--
 .../logging/log4j/core/async/RingBufferLogEventHandler.java    |  5 ++---
 log4j-parent/pom.xml                                           |  2 +-
 src/changelog/.3.x.x/1829_update_com_lmax_disruptor.xml        | 10 ++++++++++
 4 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
index 8ff05c6af5..636330cf53 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java
@@ -22,11 +22,11 @@ import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 
 import com.lmax.disruptor.EventFactory;
+import com.lmax.disruptor.EventHandler;
 import com.lmax.disruptor.EventTranslatorTwoArg;
 import com.lmax.disruptor.ExceptionHandler;
 import com.lmax.disruptor.RingBuffer;
 import com.lmax.disruptor.Sequence;
-import com.lmax.disruptor.SequenceReportingEventHandler;
 import com.lmax.disruptor.TimeoutException;
 import com.lmax.disruptor.WaitStrategy;
 import com.lmax.disruptor.dsl.Disruptor;
@@ -97,7 +97,7 @@ public class AsyncLoggerConfigDisruptor extends AbstractLifeCycle implements Asy
     /**
      * EventHandler performs the work in a separate thread.
      */
-    private static class Log4jEventWrapperHandler implements SequenceReportingEventHandler<Log4jEventWrapper> {
+    private static class Log4jEventWrapperHandler implements EventHandler<Log4jEventWrapper> {
         private static final int NOTIFY_PROGRESS_THRESHOLD = 50;
         private Sequence sequenceCallback;
         private int counter;
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java
index 460bebd49a..bf0dcb0a9b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java
@@ -16,9 +16,8 @@
  */
 package org.apache.logging.log4j.core.async;
 
-import com.lmax.disruptor.LifecycleAware;
+import com.lmax.disruptor.EventHandler;
 import com.lmax.disruptor.Sequence;
-import com.lmax.disruptor.SequenceReportingEventHandler;
 
 /**
  * This event handler gets passed messages from the RingBuffer as they become
@@ -27,7 +26,7 @@ import com.lmax.disruptor.SequenceReportingEventHandler;
  * constructor.
  */
 public class RingBufferLogEventHandler implements
-        SequenceReportingEventHandler<RingBufferLogEvent>, LifecycleAware {
+        EventHandler<RingBufferLogEvent> {
 
     private static final int NOTIFY_PROGRESS_THRESHOLD = 50;
     private Sequence sequenceCallback;
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index e38253cb66..93022ea559 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -112,7 +112,7 @@
     <commons-lang3.version>3.13.0</commons-lang3.version>
     <commons-logging.version>1.2</commons-logging.version>
     <conversant.disruptor.version>1.2.21</conversant.disruptor.version>
-    <disruptor.version>3.4.4</disruptor.version>
+    <disruptor.version>4.0.0</disruptor.version>
     <elasticsearch.version>7.17.14</elasticsearch.version>
     <embedded-ldap.version>0.9.0</embedded-ldap.version>
     <felix.version>7.0.5</felix.version>
diff --git a/src/changelog/.3.x.x/1829_update_com_lmax_disruptor.xml b/src/changelog/.3.x.x/1829_update_com_lmax_disruptor.xml
new file mode 100644
index 0000000000..ee6dfce47c
--- /dev/null
+++ b/src/changelog/.3.x.x/1829_update_com_lmax_disruptor.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns="http://logging.apache.org/log4j/changelog"
+       xsi:schemaLocation="http://logging.apache.org/log4j/changelog https://logging.apache.org/log4j/changelog-0.1.2.xsd"
+       type="changed">
+  <issue id="1829" link="https://github.com/apache/logging-log4j2/issues/1829"/>
+  <author id="mattsicker"/>
+  <author id="github:tomerarazy"/>
+  <description format="asciidoc">Update `com.lmax:disruptor` to version `4.0.0`</description>
+</entry>