public final class FeebleReferenceList<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
broadcast() |
protected static void |
clean(FeebleReference<?> fr)
Clean the list state that is kept in a FeebleReference.
|
static <T> FeebleReferenceList<T> |
factory()
A factory.
|
static void |
guaranteeIsLocked() |
FeebleReference<? extends T> |
pop()
Pop a FeebleReference off of this list.
|
boolean |
push(FeebleReference<?> fr)
Push FeebleReference on to this list if it is not already on a list.
|
FeebleReference<? extends T> |
remove() |
FeebleReference<? extends T> |
remove(long timeoutMillis)
Removes the next reference object in this queue, blocking until either one becomes available
or the given timeout period expires.
|
static void |
signalWaiters()
Called by
Target_java_lang_Thread.interrupt0() to notify waiters to check to see if
they have been interrupted. |
public static <T> FeebleReferenceList<T> factory()
public boolean push(FeebleReference<?> fr)
The race to enqueue a reference is resolved by having only the thread that can clear the list slot enqueue the reference on the queue.
The race to enqueue other references on the same queue is resolved by the compare-and-set of the sampled head.
public FeebleReference<? extends T> pop()
public FeebleReference<? extends T> remove(long timeoutMillis) throws IllegalArgumentException, InterruptedException
public FeebleReference<? extends T> remove() throws InterruptedException
InterruptedExceptionpublic static void broadcast()
public static void signalWaiters()
Target_java_lang_Thread.interrupt0() to notify waiters to check to see if
they have been interrupted.protected static void clean(FeebleReference<?> fr)
public static void guaranteeIsLocked()