public class ActionReferenceQueue extends ReferenceQueue
| Constructor and Description |
|---|
ActionReferenceQueue()
Create a new list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEntry(Object o,
Runnable action)
Add an object with an associated value.
|
int |
getEntriesSize()
Get the size of the entries (existing objects).
|
Reference |
poll()
Poll a stale entry.
|
Reference |
remove()
Remove an element from the queue.
|
Reference |
remove(long timeout)
Remove an element from the queue.
|
Runnable |
removeEntry(Object obj)
Remove an entry.
|
String |
toString()
Get the string representation.
|
public boolean addEntry(Object o, Runnable action)
o - The object (becomes weak reference).val - The value.public int getEntriesSize()
public Reference remove() throws InterruptedException
remove in class ReferenceQueueInterruptedExceptionpublic Reference remove(long timeout) throws IllegalArgumentException, InterruptedException
remove in class ReferenceQueueIllegalArgumentExceptionInterruptedExceptionpublic Reference poll()
poll in class ReferenceQueueCopyright © 2012. All Rights Reserved.