Class AbstractGraphExecutor<E>

  • All Implemented Interfaces:
    Executor<GraphParams<E>>, GraphExecutor<E>
    Direct Known Subclasses:
    NetworkTopologyExecutor

    public abstract class AbstractGraphExecutor<E>
    extends Object
    implements GraphExecutor<E>
    Base implementation of a GraphExecutor. Subclasses of this executor should provide a validation method and this class will perform the execution of the graph.

    Version:
    $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
    Author:
    Jerry Vos
    See Also:
    GraphExecutor
    • Constructor Detail

      • AbstractGraphExecutor

        public AbstractGraphExecutor​(ISchedule schedule,
                                     ScheduleParameters baseParams,
                                     Traverser<E> traverser,
                                     Executor<E> nodeExecutor)
        Constructs this graph executor to work with the specified parameters. This GraphExecutor will visit the nodes with the specified visitor, execute them with the given node executor and reschedule itself according to baseParams.
        Parameters:
        schedule - the schedule this graph executor will use to reschedule itself
        baseParams - the parameters to base its scheduling on
        traverser - the visitor for finding successors to nodes
        nodeExecutor - the executor for executing the nodes
    • Method Detail

      • execute

        public void execute​(GraphParams<E> params)
        Performs execution of the graph. This involves validating the params for execution, executing the current node with the given node executor, then scheduling this to perform execution on the current node's successors.
        Specified by:
        execute in interface Executor<E>
        Parameters:
        params - parameters on the current node to be executed
      • getScheduleParameters

        protected ScheduleParameters getScheduleParameters​(double time)
      • getNextTime

        protected double getNextTime​(GraphParams<E> params,
                                     E nextNode)
      • getRootTime

        protected double getRootTime()