|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.aa.ThreadControl
public class ThreadControl
Controls the solver threads and maintains state information for the solver threads. (Singleton design pattern)
Constructor Summary | |
---|---|
ThreadControl()
Initialize isRunning[] array to false ( = no threads running) |
Method Summary | |
---|---|
static ThreadControl |
getInstance()
Returns the single instance of this class. |
static void |
mustStop()
Throws an exception if the current SolverThread must stop. |
static boolean |
mustStop(int threadIndex)
Returns true if the thread identified by threadIndex must stop. |
static void |
notifyTerminated(int threadIndex)
Each thread must call this method immediately before it terminates so that it's threadIndex number is freed up, and can be reused for a new thread. |
static void |
startNewThread(SolverListener listener,
java.lang.String eqText)
Starts a new instance of SolverThead. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadControl()
Method Detail |
---|
public static ThreadControl getInstance()
public static void startNewThread(SolverListener listener, java.lang.String eqText) throws java.lang.Exception
Throws an exception if all possible thread index numbers are already being used.
java.lang.Exception
public static boolean mustStop(int threadIndex)
public static void mustStop() throws java.lang.Exception
java.lang.Exception
public static void notifyTerminated(int threadIndex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |