public abstract class ParkEvent extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ParkEvent.ParkEventFactory |
static class |
ParkEvent.WaitResult |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
event
The ticket: false implies unavailable, true implies available.
|
protected boolean |
resetEventBeforeWait
When true, calls to
ParkEvent.condWait() and ParkEvent.condTimedWait(long) will always wait, even a
previous call to ParkEvent.unpark() had not been consumed by a wait yet (the semantics of
Thread.sleep(long)). |
| Modifier | Constructor and Description |
|---|---|
protected |
ParkEvent()
Constructor for subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract ParkEvent.WaitResult |
condTimedWait(long delayNanos)
cond_timedwait, similar to
ParkEvent.condWait() but with a timeout in nanoseconds. |
protected abstract ParkEvent.WaitResult |
condWait() |
protected static void |
release(ParkEvent event) |
protected abstract void |
unpark()
Notify anyone waiting on this event.
|
protected boolean event
protected boolean resetEventBeforeWait
ParkEvent.condWait() and ParkEvent.condTimedWait(long) will always wait, even a
previous call to ParkEvent.unpark() had not been consumed by a wait yet (the semantics of
Thread.sleep(long)).
When false, ParkEvent.condWait() and ParkEvent.condTimedWait(long) will return immediately when a
previous call to ParkEvent.unpark() has happend (the semantics of Unsafe.park(boolean, long)).protected abstract ParkEvent.WaitResult condWait()
protected abstract ParkEvent.WaitResult condTimedWait(long delayNanos)
ParkEvent.condWait() but with a timeout in nanoseconds.protected abstract void unpark()
protected static void release(ParkEvent event)