|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
interface Awaiter
Interface for await logic implemented by Awaiters
.
Awaiters are both locked and synchronized before waiting. The awaiter is
locked first via lock()
and then the awaiter monitor is
acquired via a synchronized
block on the awaiter instance.
Implementation of lock()
is optional, but the await logic always
synchronizes on the awaiter object.
Awaiters.await(Awaiter, boolean, CallState, long)
Method Summary | |
---|---|
void |
await(long nanos)
Called within the locked and synchronized await block to suspend the current thread until notified or the given timeout value has expired. |
void |
clearDeadcheckRequest()
Sets the logical "deadcheck requested" flag to false . |
void |
deadcheck()
Signals awaiting threads to check for deadlock. |
Thread[] |
getBlockingThreads()
Used by the controller and by Deadlocks to keep track of which
agents are blocking which threads. |
Controller |
getController()
Returns the controller instance of the awaiter. |
boolean |
isDeadcheckRequested()
Returns true if this thread has an outstanding deadcheck request. |
boolean |
isExecuting()
Returns true if the awaiter is a Message and it
is in the EXECUTING state. |
boolean |
isSatisfied(CallState state)
Returns true if the await condition has been satisfied. |
void |
lock()
Optionally acquires the controller's lock. |
void |
unlock()
Optionally releases the controller's lock. |
Method Detail |
---|
Controller getController()
void lock()
void unlock()
boolean isExecuting()
true
if the awaiter is a Message
and it
is in the EXECUTING
state. Synchronous calls simulate direct
method invocations and are not candidates for deadlock notification once
they begin executing (another non-executing or non-synchronous call is
chosen instead).
boolean isSatisfied(CallState state)
true
if the await condition has been satisfied. This
awaiter may or may not utilize the optional state
value
passed to Awaiters.await(Awaiter, boolean, CallState, long)
and
forwarded to this method.
void await(long nanos) throws InterruptedException
InterruptedException
void deadcheck()
true
.
boolean isDeadcheckRequested()
void clearDeadcheckRequest()
false
.
Thread[] getBlockingThreads()
Deadlocks
to keep track of which
agents are blocking which threads. This accounting is used during
deadlock detection to determine thread block dependencies and possible
circular deadlocked dependencies.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |