org.eclipse.emf.henshin.statespace.impl
Class ParallelStateSpaceManager

java.lang.Object
  extended by org.eclipse.emf.henshin.statespace.impl.StateSpaceIndexImpl
      extended by org.eclipse.emf.henshin.statespace.impl.BasicStateSpaceManager
          extended by org.eclipse.emf.henshin.statespace.impl.ParallelStateSpaceManager
All Implemented Interfaces:
StateSpaceIndex, StateSpaceManager

public class ParallelStateSpaceManager
extends BasicStateSpaceManager

Parallelized StateSpaceManager implementation.


Field Summary
 
Fields inherited from class org.eclipse.emf.henshin.statespace.impl.BasicStateSpaceManager
explorers, ignoreDuplicateTransitions, maxStateDistance, stateDistanceMonitor, stateSpaceLock
 
Fields inherited from interface org.eclipse.emf.henshin.statespace.StateSpaceManager
DEBUG_ENFORCE_DETERMINISM
 
Constructor Summary
ParallelStateSpaceManager(StateSpace stateSpace)
          Default constructor.
ParallelStateSpaceManager(StateSpace stateSpace, int numThreads)
          Default constructor.
 
Method Summary
 List<State> exploreStates(List<State> states, boolean generateLocations)
          Explore states concurrently.
 int getNumThreads()
          Get the number of threads used by this state manager.
 void shutdown()
          Shutdown this state space manager.
 
Methods inherited from class org.eclipse.emf.henshin.statespace.impl.BasicStateSpaceManager
acquireExplorer, clearCache, createInitialState, createOpenState, deriveModel, exploreState, findState, getStateDistance, isOpen, mergeTerminalStates, refreshHelpers, releaseExplorer, removeState, resetStateSpace, shiftedLocation
 
Methods inherited from class org.eclipse.emf.henshin.statespace.impl.StateSpaceIndexImpl
addToCache, addToIndex, getCachedModel, getModel, getState, getState, getStateSpace, removeFromIndex, resetIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.emf.henshin.statespace.StateSpaceIndex
getCachedModel, getModel, getState, getStateSpace
 

Constructor Detail

ParallelStateSpaceManager

public ParallelStateSpaceManager(StateSpace stateSpace,
                                 int numThreads)
Default constructor.

Parameters:
stateSpace - State space.
numThreads - Number of threads to be used.

ParallelStateSpaceManager

public ParallelStateSpaceManager(StateSpace stateSpace)
Default constructor.

Parameters:
stateSpace - State space.
Method Detail

exploreStates

public List<State> exploreStates(List<State> states,
                                 boolean generateLocations)
                          throws StateSpaceException
Explore states concurrently.

Specified by:
exploreStates in interface StateSpaceManager
Overrides:
exploreStates in class BasicStateSpaceManager
Parameters:
states - States to be explored.
generateLocations - Whether to generate locations.
Returns:
Newly created successor states.
Throws:
StateSpaceException - On state space errors.

getNumThreads

public int getNumThreads()
Description copied from interface: StateSpaceManager
Get the number of threads used by this state manager.

Specified by:
getNumThreads in interface StateSpaceManager
Overrides:
getNumThreads in class BasicStateSpaceManager
Returns:
The number of used threads.

shutdown

public void shutdown()
Description copied from interface: StateSpaceManager
Shutdown this state space manager.

Specified by:
shutdown in interface StateSpaceManager
Overrides:
shutdown in class BasicStateSpaceManager