public class NextLock
extends java.lang.Object
NextLock
is a concurrency manager that allows one to await the next occurrence of
an event in a (possibly infinite) sequence that follows after the juncture at which one
chooses to pay attention.Modifier and Type | Class and Description |
---|---|
class |
NextLock.Waiter
NextLock.Waiter instances are returned from getNextWaiter() , and can
be used to await the next advanceNext() call in lock from which they
were retrieved. |
Modifier and Type | Field and Description |
---|---|
protected long |
count |
protected java.lang.Object |
lock |
Constructor and Description |
---|
NextLock() |
Modifier and Type | Method and Description |
---|---|
void |
advanceNext()
Advances to the next event in the sequence.
|
NextLock.Waiter |
getNextWaiter()
Returns a
NextLock.Waiter that will await the next advanceNext() . |
public NextLock.Waiter getNextWaiter()
NextLock.Waiter
that will await the next advanceNext()
.NextLock.Waiter
that will await the next advanceNext()
.advanceNext()
public void advanceNext()
getNextWaiter()