Skip to content

Instantly share code, notes, and snippets.

@sitotkfm
Created December 16, 2015 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sitotkfm/570811296c44a1ce75bd to your computer and use it in GitHub Desktop.
Save sitotkfm/570811296c44a1ce75bd to your computer and use it in GitHub Desktop.
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