org.axonframework.eventhandling.async
Class SequentialPolicy

java.lang.Object
  extended by org.axonframework.eventhandling.async.SequentialPolicy
All Implemented Interfaces:
SequencingPolicy<Object>

public class SequentialPolicy
extends Object
implements SequencingPolicy<Object>

SequencingPolicy that requires serialized handling of all events delivered to an event handler. This is the default policy for event handlers.

Since:
0.3
Author:
Allard Buijze

Constructor Summary
SequentialPolicy()
           
 
Method Summary
 Object getSequenceIdentifierFor(Object task)
          Returns the sequence identifier for the given event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequentialPolicy

public SequentialPolicy()
Method Detail

getSequenceIdentifierFor

public Object getSequenceIdentifierFor(Object task)
Returns the sequence identifier for the given event. When two events have the same identifier (as defined by their equals method), they will be executed sequentially. A null value indicates that there are no sequencing requirements for the handling of this event.

Specified by:
getSequenceIdentifierFor in interface SequencingPolicy<Object>
Parameters:
task - the event for which to get the sequencing identifier
Returns:
a sequence identifier for the given event


Copyright © 2010-2016. All Rights Reserved.