|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.udo.cs.miningmart.compiler.CompilerThreadControl
This class is used in CompilerAccessLogic in order to avoid database deadlocks when garbage collection and single step compilation threads are mixed. Current strategy:
Field Summary | |
static short |
GARBAGE_COLLECTION
constant for state "resource is occupied by garbage collection" |
static short |
RESOURCE_FREE
constant for state "resource is free" |
static short |
STEP_COMPILATION
constant for state "resource is occupied by the single step compiler" |
Constructor Summary | |
CompilerThreadControl()
|
Method Summary | |
void |
addThread(short type)
This method registers a thread before execution, in order to regulate concurrent access to resources. |
void |
subThread(short type)
This method unregisters a thread of a specified type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short RESOURCE_FREE
public static final short GARBAGE_COLLECTION
public static final short STEP_COMPILATION
Constructor Detail |
public CompilerThreadControl()
Method Detail |
public void addThread(short type) throws M4CompilerError
type
- One of the constants (public static fields) of this class,
representing different types of threads.
M4CompilerError
public void subThread(short type) throws M4CompilerError
addThread(short)
after the critical resource is no longer accessed.
type
- One of the constants (public static fields) of this class,
representing different types of threads.
M4CompilerError
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |