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 booleanSet by terminate() to indicate step abortion.protected booleanCheck if currently blocked.protected jadex.future.Future<?> Provide access to future when suspended.protected ReentrantLockUse reentrant lock/condition instead of synchronized/wait/notify to avoid pinning when using virtual threads.protected ConditionFields 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:
suspendin interfacejadex.future.ISuspendable
-
resume
public void resume(jadex.future.Future<?> future) - Specified by:
resumein 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:
getFuturein interfacejadex.future.ISuspendable
-
getLock
- Specified by:
getLockin interfacejadex.future.ISuspendable
-