Javadoc
Created by ruedi on 02.06.14.
Single threaded, can be used from within one actor only !
Problem:
you complete a stream of events related to some items (e.g. UserSessions or Trades)
you need to do some asynchronous lookups during processing (e.g. query data async)
now you want to process parallel, but need to process events related to a single item
in order (e.g. want to process trades related to say BMW in the order they come in).
usage:
ticketMachine.getTicket( "BMW" ).then(
(endSignalfuture,e) -> {
.. wild async processing ..
endsignalFuture.complete("done",null); // will execute next event on bmw if present
});
Note Actor.serialOn internally makes use of this