Package jadex.concurrent
Class ThreadPool.ServiceThread
java.lang.Object
java.lang.Thread
jadex.concurrent.ThreadPool.ServiceThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
ThreadPool
A service thread executes tasks.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Runnable
The actual task.protected boolean
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetTask()
Get the runnable (the task).protected void
(method "park" already exists in android - do not overwrite)protected void
(method "unpark" already exists in android - do not overwrite)protected void
remove()
Remove the service thread from the pool.void
run()
Dequeue an element from the queue and execute it.toString()
Get the string representation.Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, yield
-
Field Details
-
task
The actual task. -
terminated
protected boolean terminated -
notified
protected boolean notified
-
-
Constructor Details
-
ServiceThread
public ServiceThread()Create a new thread.
-
-
Method Details
-
run
public void run()Dequeue an element from the queue and execute it. -
markParked
protected void markParked()(method "park" already exists in android - do not overwrite) -
markUnpark
protected void markUnpark()(method "unpark" already exists in android - do not overwrite) -
remove
protected void remove()Remove the service thread from the pool. -
getTask
Get the runnable (the task).- Returns:
- The runnable.
-
toString
Get the string representation.
-