public class ActionReferenceQueue
extends java.lang.ref.ReferenceQueue
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.List | 
entries
The list of elements. 
 | 
| Constructor and Description | 
|---|
ActionReferenceQueue()
Create a new list. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
addEntry(java.lang.Object o,
        java.lang.Runnable action)
Add an object with an associated value. 
 | 
int | 
getEntriesSize()
Get the size of the entries (existing objects). 
 | 
java.lang.ref.Reference | 
poll()
Poll a stale entry. 
 | 
java.lang.ref.Reference | 
remove()
Remove an element from the queue. 
 | 
java.lang.ref.Reference | 
remove(long timeout)
Remove an element from the queue. 
 | 
java.lang.Runnable | 
removeEntry(java.lang.Object obj)
Remove an entry. 
 | 
java.lang.String | 
toString()
Get the string representation. 
 | 
public boolean addEntry(java.lang.Object o,
                        java.lang.Runnable action)
o - The object (becomes weak reference).val - The value.public java.lang.Runnable removeEntry(java.lang.Object obj)
public int getEntriesSize()
public java.lang.ref.Reference remove()
                               throws java.lang.InterruptedException
remove in class java.lang.ref.ReferenceQueuejava.lang.InterruptedExceptionpublic java.lang.ref.Reference remove(long timeout)
                               throws java.lang.IllegalArgumentException,
                                      java.lang.InterruptedException
remove in class java.lang.ref.ReferenceQueuejava.lang.IllegalArgumentExceptionjava.lang.InterruptedExceptionpublic java.lang.ref.Reference poll()
poll in class java.lang.ref.ReferenceQueuepublic java.lang.String toString()
toString in class java.lang.Object