Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
disruptor.handleEventsWith(
(event, sequence, endOfBatch) -> {
System.out.println("Handler1-1 Event: " + event.get() + ",currentTimeMillis:" + System.currentTimeMillis());
Thread.sleep(1000);
}
).then(
(event, sequence, endOfBatch) -> {
System.out.println("Handler1-2 Event: " + event.get() + ",currentTimeMillis:" + System.currentTimeMillis());
}
);
disruptor.handleEventsWith(
(event, sequence, endOfBatch) -> {
System.out.println("Handler2-1 Event: " + event.get() + ",currentTimeMillis:" + System.currentTimeMillis());
Thread.sleep(500);
}
).then(
(event, sequence, endOfBatch) -> {
System.out.println("Handler2-2 Event: " + event.get() + ",currentTimeMillis:" + System.currentTimeMillis());
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment