Package jadex.execution.impl
Class ExecutionFeature.ComponentSuspendable
java.lang.Object
jadex.execution.impl.ExecutionFeature.ComponentSuspendable
- All Implemented Interfaces:
jadex.future.ISuspendable
- Enclosing class:
ExecutionFeature
protected class ExecutionFeature.ComponentSuspendable
extends Object
implements jadex.future.ISuspendable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Set by terminate() to indicate step abortion.protected boolean
Check if currently blocked.protected jadex.future.Future
<?> Provide access to future when suspended.protected ReentrantLock
Use reentrant lock/condition instead of synchronized/wait/notify to avoid pinning when using virtual threads.protected Condition
Fields inherited from interface jadex.future.ISuspendable
SUSPENDABLE
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
blocked
protected boolean blockedCheck if currently blocked. -
aborted
protected boolean abortedSet by terminate() to indicate step abortion. -
future
protected jadex.future.Future<?> futureProvide access to future when suspended. -
lock
Use reentrant lock/condition instead of synchronized/wait/notify to avoid pinning when using virtual threads. -
wait
-
-
Constructor Details
-
ComponentSuspendable
protected ComponentSuspendable()
-
-
Method Details
-
suspend
public void suspend(jadex.future.Future<?> future, long timeout, boolean realtime) - Specified by:
suspend
in interfacejadex.future.ISuspendable
-
resume
public void resume(jadex.future.Future<?> future) - Specified by:
resume
in interfacejadex.future.ISuspendable
-
abort
protected void abort()Unblock and exit thread with ThreadDeath. Has no effect when not blocked. -
getFuture
public jadex.future.IFuture<?> getFuture()- Specified by:
getFuture
in interfacejadex.future.ISuspendable
-
getLock
- Specified by:
getLock
in interfacejadex.future.ISuspendable
-