com.hammurapi.eventbus
Class DispatchNetworkDotSnapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>

Show UML class diagram
java.lang.Object
  extended by com.hammurapi.eventbus.DispatchNetworkDotSnapshot<E,P,C,K,H,S>
Type Parameters:
E -
P -
C -
K -
All Implemented Interfaces:
AbstractEventBus.Snapshot<E,P,C,K,H,S>
Direct Known Subclasses:
LocalDispatchNetworkDotSnapshot

public class DispatchNetworkDotSnapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>
extends Object
implements AbstractEventBus.Snapshot<E,P,C,K,H,S>

Outputs dispatch network in DOT format.


Constructor Summary
DispatchNetworkDotSnapshot(File out)
           
 
Method Summary
 void end(boolean success)
          Invoked at the end of taking snapshot
 void handler(K id, EventHandler<E,P,C,H,S> eventHandler)
           
 void joinInput(K id, K joinNodeId, int index)
           
 void joinNode(K id,  predicate, Set<Integer> outputIndices, K eventHandlerId, K nextJoinNodeId)
           
 void predicateNode(K id,  predicate, Collection<K> trueChildren, Collection<K> trueHandlers, Collection<K> falseChildren, Collection<K> falseHandlers, boolean isRoot)
           
 void setGraphAttribute(String name, String value)
          Sets gpraph attribute, see DOT language documentation (http://www.graphviz.org/pdf/dotguide.pdf) for details.
 void start()
          Invoked before any other methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DispatchNetworkDotSnapshot

public DispatchNetworkDotSnapshot(File out)
Method Detail

start

public void start()
Description copied from interface: AbstractEventBus.Snapshot
Invoked before any other methods.

Specified by:
start in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>

end

public void end(boolean success)
Description copied from interface: AbstractEventBus.Snapshot
Invoked at the end of taking snapshot

Specified by:
end in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>
Parameters:
success - True if there've been no exceptions.

handler

public void handler(K id,
                    EventHandler<E,P,C,H,S> eventHandler)
Specified by:
handler in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>

setGraphAttribute

public void setGraphAttribute(String name,
                              String value)
Sets gpraph attribute, see DOT language documentation (http://www.graphviz.org/pdf/dotguide.pdf) for details.


predicateNode

public void predicateNode(K id,
                           predicate,
                          Collection<K> trueChildren,
                          Collection<K> trueHandlers,
                          Collection<K> falseChildren,
                          Collection<K> falseHandlers,
                          boolean isRoot)
Specified by:
predicateNode in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>

joinInput

public void joinInput(K id,
                      K joinNodeId,
                      int index)
Specified by:
joinInput in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>

joinNode

public void joinNode(K id,
                      predicate,
                     Set<Integer> outputIndices,
                     K eventHandlerId,
                     K nextJoinNodeId)
Specified by:
joinNode in interface AbstractEventBus.Snapshot<E,P extends Comparable<P>,C,K,H extends EventBus.Handle<E,P,C>,S extends EventStore<E,P,C,H,S>>
Parameters:
id - Join node ID.
outputIndices - Node output indices.
eventHandlerId - Handler ID if this node is a final join node.
nextJoinNodeId - Next join node id for intermediary nodes.