public class Threader extends MadaraJNI
| Constructor and Description |
|---|
Threader()
Default constructor
|
Threader(KnowledgeBase dataPlane)
Constructor with data plane
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Cleans up underlying C resources
|
void |
free()
Deletes the C++ instantiation.
|
void |
pause()
Requests all threads to pause
|
void |
pause(java.lang.String name)
Requests for the specified thread to pause
|
void |
resume()
Requests all threads to resume if paused
|
void |
resume(java.lang.String name)
Requests for the specified thread to resume if paused
|
void |
run(double hertz,
java.lang.String name,
BaseThread thread)
Runs a thread.
|
void |
run(java.lang.String name,
BaseThread thread)
Runs a thread.
|
void |
startPaused(double hertz,
java.lang.String name,
BaseThread thread)
Starts a thread in a paused state.
|
void |
startPaused(java.lang.String name,
BaseThread thread)
Starts a thread in a paused state.
|
void |
terminate()
Requests all threads to terminate
|
void |
terminate(java.lang.String name)
Requests for the specified thread to terminate
|
void |
waitForThread(java.lang.String name)
Waits for a specific thread to finish
|
void |
waitForThreads()
Waits for all threads to finish
|
public Threader()
public Threader(KnowledgeBase dataPlane)
dataPlane - the knowledge base for threads to use for datapublic void free()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - necessary for override but unusedpublic void run(java.lang.String name,
BaseThread thread)
name - the unique name of the threadthread - the thread to runpublic void run(double hertz,
java.lang.String name,
BaseThread thread)
hertz - the intended frequency of executions per secondname - the unique name of the threadthread - the thread to runpublic void startPaused(java.lang.String name,
BaseThread thread)
name - the unique name of the threadthread - the thread to start in a paused statepublic void startPaused(double hertz,
java.lang.String name,
BaseThread thread)
hertz - the intended frequency of executions per secondname - the unique name of the threadthread - the thread to start in a paused statepublic void pause(java.lang.String name)
name - the unique name of the thread requested to pausepublic void pause()
public void waitForThread(java.lang.String name)
name - the unique name of the threadpublic void waitForThreads()
public void terminate(java.lang.String name)
name - the unique name of the threadpublic void terminate()
public void resume(java.lang.String name)
name - the unique name of the threadpublic void resume()