org.demac.process.base.extension
Class ConcurrencyService

java.lang.Object
  extended by org.demac.process.base.extension.ExtensionModule
      extended by org.demac.process.base.extension.ConcurrencyService
All Implemented Interfaces:
Service
Direct Known Subclasses:
ConcurrencyServiceImpl

public abstract class ConcurrencyService
extends ExtensionModule

This class performs several services needed for parallel execution of processes.


Field Summary
static java.lang.String ID
           
 
Fields inherited from class org.demac.process.base.extension.ExtensionModule
STATUS_EXECUTION_DONE, STATUS_MIGRATE_TO_OTHER, STATUS_WAIT_FOR_EVENT
 
Constructor Summary
ConcurrencyService()
           
 
Method Summary
abstract  int checkForJoin(AmplifiedPackage ap, java.lang.String actRefId)
          Checks, if a Join has to be performed and tries to perform it.
 boolean execute(DataSet ds, java.lang.String type)
          Deprecated.  
abstract  int executeSplit(AmplifiedPackage ap, java.lang.String actRefId)
          Tries to execute a Split
abstract  java.util.Set getConflicts(Package p, java.lang.String dataClasses)
          Returns a set of conflicts, which occur in the process
 java.lang.String getId()
           
abstract  int solveConflicts(DataSet ds, java.lang.String actRefId)
          Checks if there is a dependency conflict at the current activity and begins the resolution of the conflict
 
Methods inherited from class org.demac.process.base.extension.ExtensionModule
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.demac.Service
isStarted, start, stop
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

ConcurrencyService

public ConcurrencyService()
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in class ExtensionModule
Returns:
the identifier of the org.demac.process.base.extension.ExtensionModule.

getConflicts

public abstract java.util.Set getConflicts(Package p,
                                           java.lang.String dataClasses)
Returns a set of conflicts, which occur in the process

Parameters:
p - DPDL-Package
dataClasses - String of configuration of data classes
Returns:
Set of conflicts

solveConflicts

public abstract int solveConflicts(DataSet ds,
                                   java.lang.String actRefId)
Checks if there is a dependency conflict at the current activity and begins the resolution of the conflict

Parameters:
ds - the DataSet where the process is stored
actRefId - the ID of the current Activity
Returns:
status code, one of ExtensionModule.STATUS_EXECUTION_DONE, ExtensionModule.STATUS_WAIT_FOR_EVENT, ExtensionModule.STATUS_MIGRATE_TO_OTHER

executeSplit

public abstract int executeSplit(AmplifiedPackage ap,
                                 java.lang.String actRefId)
                          throws ParserException,
                                 StorageException
Tries to execute a Split

Parameters:
ap - the process
actRefId - the ID of the Activity to check
Returns:
status code, one of ExtensionModule.STATUS_EXECUTION_DONE, ExtensionModule.STATUS_WAIT_FOR_EVENT, ExtensionModule.STATUS_MIGRATE_TO_OTHER
Throws:
ParserException
StorageException

checkForJoin

public abstract int checkForJoin(AmplifiedPackage ap,
                                 java.lang.String actRefId)
Checks, if a Join has to be performed and tries to perform it.

Parameters:
ap - the process
actRefId - the ID of the Activity to check
Returns:
status code, one of ExtensionModule.STATUS_EXECUTION_DONE, ExtensionModule.STATUS_WAIT_FOR_EVENT, ExtensionModule.STATUS_MIGRATE_TO_OTHER

execute

public boolean execute(DataSet ds,
                       java.lang.String type)
                throws java.lang.Exception
Deprecated. 

Description copied from class: ExtensionModule
Method to call a function of the org.demac.process.base.extension.ExtensionModule.

Specified by:
execute in class ExtensionModule
type - a possible description to specify the handling of the object to execute (if there is more than one possibility to execute it).
Returns:
true, if process has to be executed normally when this execution ends.
Throws:
java.lang.Exception