Skip to content

Commit

Permalink
Upgrade to LMAX Disruptor 4.0.0
Browse files Browse the repository at this point in the history
Fixes apache#1829

Signed-off-by: tomerarazy <[email protected]>
  • Loading branch information
tomerarazy authored and ppkarwasz committed Dec 19, 2023
1 parent bd08644 commit ee58635
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
package org.apache.logging.log4j.core.async;

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;
Expand Down Expand Up @@ -92,7 +92,7 @@ public String toString() {
/**
* 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@
*/
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
* available. Processing of these messages is done in a separate thread,
* controlled by the {@code Executor} passed to the {@code Disruptor}
* constructor.
*/
public class RingBufferLogEventHandler implements SequenceReportingEventHandler<RingBufferLogEvent>, LifecycleAware {
public class RingBufferLogEventHandler implements EventHandler<RingBufferLogEvent> {

private static final int NOTIFY_PROGRESS_THRESHOLD = 50;
private Sequence sequenceCallback;
Expand Down
2 changes: 1 addition & 1 deletion log4j-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<commons-logging.version>1.3.0</commons-logging.version>
<!-- `com.conversantmedia:disruptor` version 1.2.16 requires Java 9: -->
<conversant.disruptor.version>1.2.15</conversant.disruptor.version>
<disruptor.version>3.4.4</disruptor.version>
<disruptor.version>4.0.0</disruptor.version>
<elasticsearch-java.version>8.11.2</elasticsearch-java.version>
<embedded-ldap.version>0.9.0</embedded-ldap.version>
<felix.version>7.0.5</felix.version>
Expand Down

0 comments on commit ee58635

Please sign in to comment.