public class ThreadGuard extends Object
Condition
s when a
concurrent event may cause the Condition
to become unsatisfiable.Modifier and Type | Class and Description |
---|---|
static class |
ThreadGuard.Guard |
Constructor and Description |
---|
ThreadGuard() |
Modifier and Type | Method and Description |
---|---|
void |
decThread()
Decrement thread in critical region awaiting a
Condition . |
<T> T |
guard(Callable<T> r)
Execute a critical region which needs to be interrupted if some condition
is violated.
|
void |
guard(Runnable r)
Execute a critical region which needs to be interrupted if some condition
is violated.
|
void |
guard(ThreadGuard.Guard r)
Execute a critical region which needs to be interrupted if some condition
is violated.
|
void |
interruptAll()
Interrupt any threads in critical regions awaiting a
Condition . |
public void guard(Runnable r)
r
- The lambda.public void guard(ThreadGuard.Guard r) throws InterruptedException
r
- The lambda.InterruptedException
public <T> T guard(Callable<T> r) throws Exception
r
- The lambda.Exception
public void decThread()
Condition
.public void interruptAll()
Condition
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.