Skip to content

Commit ee58635

Browse files
tomerarazyppkarwasz
authored andcommitted
Upgrade to LMAX Disruptor 4.0.0
Fixes #1829 Signed-off-by: tomerarazy <tomerarazy@gmail.com>
1 parent bd08644 commit ee58635

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

log4j-core/src/main/java/org/apache/logging/log4j/core/async/AsyncLoggerConfigDisruptor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
package org.apache.logging.log4j.core.async;
1818

1919
import com.lmax.disruptor.EventFactory;
20+
import com.lmax.disruptor.EventHandler;
2021
import com.lmax.disruptor.EventTranslatorTwoArg;
2122
import com.lmax.disruptor.ExceptionHandler;
2223
import com.lmax.disruptor.RingBuffer;
2324
import com.lmax.disruptor.Sequence;
24-
import com.lmax.disruptor.SequenceReportingEventHandler;
2525
import com.lmax.disruptor.TimeoutException;
2626
import com.lmax.disruptor.WaitStrategy;
2727
import com.lmax.disruptor.dsl.Disruptor;
@@ -92,7 +92,7 @@ public String toString() {
9292
/**
9393
* EventHandler performs the work in a separate thread.
9494
*/
95-
private static class Log4jEventWrapperHandler implements SequenceReportingEventHandler<Log4jEventWrapper> {
95+
private static class Log4jEventWrapperHandler implements EventHandler<Log4jEventWrapper> {
9696
private static final int NOTIFY_PROGRESS_THRESHOLD = 50;
9797
private Sequence sequenceCallback;
9898
private int counter;

log4j-core/src/main/java/org/apache/logging/log4j/core/async/RingBufferLogEventHandler.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
*/
1717
package org.apache.logging.log4j.core.async;
1818

19-
import com.lmax.disruptor.LifecycleAware;
19+
import com.lmax.disruptor.EventHandler;
2020
import com.lmax.disruptor.Sequence;
21-
import com.lmax.disruptor.SequenceReportingEventHandler;
2221

2322
/**
2423
* This event handler gets passed messages from the RingBuffer as they become
2524
* available. Processing of these messages is done in a separate thread,
2625
* controlled by the {@code Executor} passed to the {@code Disruptor}
2726
* constructor.
2827
*/
29-
public class RingBufferLogEventHandler implements SequenceReportingEventHandler<RingBufferLogEvent>, LifecycleAware {
28+
public class RingBufferLogEventHandler implements EventHandler<RingBufferLogEvent> {
3029

3130
private static final int NOTIFY_PROGRESS_THRESHOLD = 50;
3231
private Sequence sequenceCallback;

log4j-parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<commons-logging.version>1.3.0</commons-logging.version>
8080
<!-- `com.conversantmedia:disruptor` version 1.2.16 requires Java 9: -->
8181
<conversant.disruptor.version>1.2.15</conversant.disruptor.version>
82-
<disruptor.version>3.4.4</disruptor.version>
82+
<disruptor.version>4.0.0</disruptor.version>
8383
<elasticsearch-java.version>8.11.2</elasticsearch-java.version>
8484
<embedded-ldap.version>0.9.0</embedded-ldap.version>
8585
<felix.version>7.0.5</felix.version>

0 commit comments

Comments
 (0)