org.eclipse.viatra.dse.base

## Class GlobalContext

- java.lang.Object
- - org.eclipse.viatra.dse.base.GlobalContext

-     public class GlobalContext
      extends java.lang.Object

  Creates new contexts for strategies. It is needed because of the multithreading.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GlobalContext.ExplorationProcessState`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GlobalContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `canStartNewThread()`
    `void` | `deregisterDesignSpaceVisualizer(IDesignSpaceVisualizer visualizer)`
    `ConflictResolver` | `getConflictResolver()`
    `IDesignSpace` | `getDesignSpace()`
    `java.util.Collection<java.lang.Throwable>` | `getExceptions()`
    `java.util.List<IGlobalConstraint>` | `getGlobalConstraints()`
    `IObjective[][]` | `getLeveledObjectives()`
    `int` | `getNumberOfStartedThreads()`
    `java.util.List<IObjective>` | `getObjectives()`
    `java.lang.Object` | `getSharedObject()`
    `SolutionStore` | `getSolutionStore()`
    `java.util.Map<RuleSpecification<?>,BatchTransformationRule<?,?>>` | `getSpecificationRuleMap()`
    `GlobalContext.ExplorationProcessState` | `getState()`
    `IStateCoderFactory` | `getStateCoderFactory()`
    `DSEThreadPool` | `getThreadPool()`
    `java.util.Set<BatchTransformationRule<?,?>>` | `getTransformations()`
    `java.util.List<IDesignSpaceVisualizer>` | `getVisualizers()`
    `void` | `initVisualizersForThread(ThreadContext threadContext)`
    `boolean` | `isDesignSpaceVisualizerRegistered(IDesignSpaceVisualizer visualizer)`
    `boolean` | `isDone()`
    `boolean` | `isExceptionHappendInOtherThread()`
    `boolean` | `isNotStarted()`
    `void` | `registerDesignSpaceVisualizer(IDesignSpaceVisualizer visualizer)`
    `void` | `registerException(java.lang.Throwable e)`
    `void` | `setConflictResolver(ConflictResolver conflictResolver)`
    `void` | `setDesignSpace(IDesignSpace designSpace)`
    `void` | `setGlobalConstraints(java.util.List<IGlobalConstraint> globalConstraints)`
    `void` | `setObjectives(java.util.List<IObjective> objectives)`
    `void` | `setSharedObject(java.lang.Object sharedObject)`
    `void` | `setSolutionStore(SolutionStore solutionStore)`
    `void` | `setStateCoderFactory(IStateCoderFactory stateCoderFactory)`
    `void` | `setTransformations(java.util.Set<BatchTransformationRule<?,?>> transformations)`
    `void` | `startAllThreads(ThreadContext originalThreadContext, IStrategyFactory strategyFactory)`
    `ExplorerThread` | `startFirstThread(IStrategy strategy, org.eclipse.emf.common.notify.Notifier model)`
    `ExplorerThread` | `startFirstThreadWithoutModelClone(IStrategy strategy, org.eclipse.emf.common.notify.Notifier model)`
    `void` | `stopAllThreads()`
    `void` | `strategyFinished(ExplorerThread strategy)` Starts a new thread to explore the design space.
    `ExplorerThread` | `tryStartNewThread(ThreadContext originalThreadContext, IStrategy strategy)`
    `ExplorerThread` | `tryStartNewThreadWithoutModelClone(ThreadContext originalThreadContext, IStrategy strategy)`
    `void` | `waitForTermination()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GlobalContext

          public GlobalContext()

  - ### Method Detail

    - #### waitForTermination

          public void waitForTermination()

    - #### tryStartNewThread

          public ExplorerThread tryStartNewThread(ThreadContext originalThreadContext,
                                                  IStrategy strategy)

    - #### tryStartNewThreadWithoutModelClone

          public ExplorerThread tryStartNewThreadWithoutModelClone(ThreadContext originalThreadContext,
                                                                   IStrategy strategy)

    - #### startFirstThread

          public ExplorerThread startFirstThread(IStrategy strategy,
                                                 org.eclipse.emf.common.notify.Notifier model)

    - #### startFirstThreadWithoutModelClone

          public ExplorerThread startFirstThreadWithoutModelClone(IStrategy strategy,
                                                                  org.eclipse.emf.common.notify.Notifier model)

    - #### startAllThreads

          public void startAllThreads(ThreadContext originalThreadContext,
                                      IStrategyFactory strategyFactory)

    - #### strategyFinished

          public void strategyFinished(ExplorerThread strategy)

      Starts a new thread to explore the design space.
      Parameters:
        `strategyBase` - The `Strategy`.
        `tedToClone` - The model to clone. Hint: context.getTed()

    - #### isDone

          public boolean isDone()

    - #### isNotStarted

          public boolean isNotStarted()

    - #### canStartNewThread

          public boolean canStartNewThread()

    - #### stopAllThreads

          public void stopAllThreads()

    - #### registerException

          public void registerException(java.lang.Throwable e)

    - #### getVisualizers

          public java.util.List<IDesignSpaceVisualizer> getVisualizers()

    - #### registerDesignSpaceVisualizer

          public void registerDesignSpaceVisualizer(IDesignSpaceVisualizer visualizer)

    - #### deregisterDesignSpaceVisualizer

          public void deregisterDesignSpaceVisualizer(IDesignSpaceVisualizer visualizer)

    - #### isDesignSpaceVisualizerRegistered

          public boolean isDesignSpaceVisualizerRegistered(IDesignSpaceVisualizer visualizer)

    - #### initVisualizersForThread

          public void initVisualizersForThread(ThreadContext threadContext)

    - #### isExceptionHappendInOtherThread

          public boolean isExceptionHappendInOtherThread()

    - #### getExceptions

          public java.util.Collection<java.lang.Throwable> getExceptions()

    - #### getStateCoderFactory

          public IStateCoderFactory getStateCoderFactory()

    - #### setStateCoderFactory

          public void setStateCoderFactory(IStateCoderFactory stateCoderFactory)

    - #### getTransformations

          public java.util.Set<BatchTransformationRule<?,?>> getTransformations()

    - #### setTransformations

          public void setTransformations(java.util.Set<BatchTransformationRule<?,?>> transformations)

    - #### getThreadPool

          public DSEThreadPool getThreadPool()

    - #### getDesignSpace

          public IDesignSpace getDesignSpace()

    - #### setDesignSpace

          public void setDesignSpace(IDesignSpace designSpace)

    - #### getNumberOfStartedThreads

          public int getNumberOfStartedThreads()

    - #### getSharedObject

          public java.lang.Object getSharedObject()

    - #### setSharedObject

          public void setSharedObject(java.lang.Object sharedObject)

    - #### getState

          public GlobalContext.ExplorationProcessState getState()

    - #### getObjectives

          public java.util.List<IObjective> getObjectives()

    - #### setObjectives

          public void setObjectives(java.util.List<IObjective> objectives)

    - #### getGlobalConstraints

          public java.util.List<IGlobalConstraint> getGlobalConstraints()

    - #### setGlobalConstraints

          public void setGlobalConstraints(java.util.List<IGlobalConstraint> globalConstraints)

    - #### getLeveledObjectives

          public IObjective[][] getLeveledObjectives()

    - #### setSolutionStore

          public void setSolutionStore(SolutionStore solutionStore)

    - #### getSolutionStore

          public SolutionStore getSolutionStore()

    - #### getSpecificationRuleMap

          public java.util.Map<RuleSpecification<?>,BatchTransformationRule<?,?>> getSpecificationRuleMap()

    - #### setConflictResolver

          public void setConflictResolver(ConflictResolver conflictResolver)

    - #### getConflictResolver

          public ConflictResolver getConflictResolver()