Runnable that will executed once there are no references to an Object
anymore.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final AtomicBoolean | |
| private static final Runnable | |
| pack-priv static final String | |
| private static final Set | |
| private static final ReferenceQueue | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | |
| public static void |
| CLEANER_RUNNING | back to summary |
|---|---|
| private static final AtomicBoolean CLEANER_RUNNING | |
| CLEANER_TASK | back to summary |
|---|---|
| private static final Runnable CLEANER_TASK | |
| CLEANER_THREAD_NAME | back to summary |
|---|---|
| pack-priv static final String CLEANER_THREAD_NAME | |
| LIVE_SET | back to summary |
|---|---|
| private static final Set<ObjectCleaner. | |
| REFERENCE_QUEUE | back to summary |
|---|---|
| private static final ReferenceQueue<Object> REFERENCE_QUEUE | |
| REFERENCE_QUEUE_POLL_TIMEOUT_MS | back to summary |
|---|---|
| private static final int REFERENCE_QUEUE_POLL_TIMEOUT_MS | |
| ObjectCleaner | back to summary |
|---|---|
| private ObjectCleaner() | |
| getLiveSetCount | back to summary |
|---|---|
| public static int getLiveSetCount() | |
| register | back to summary |
|---|---|
| public static void register(Object object, Runnable cleanupTask) Register the given | |
| Modifier and Type | Field and Description |
|---|---|
| private final Runnable |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public void | |
| public Thread |
| cleanupTask | back to summary |
|---|---|
| private final Runnable cleanupTask | |
| AutomaticCleanerReference | back to summary |
|---|---|
| pack-priv AutomaticCleanerReference(Object referent, Runnable cleanupTask) | |
| cleanup | back to summary |
|---|---|
| pack-priv void cleanup() | |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Doc from java. Clears this reference object. Invoking this method will not cause this object to be enqueued. This method is invoked only by Java code; when the garbage collector clears references it does so directly, without invoking this method.
| |
| get | back to summary |
|---|---|
| public Thread get() Overrides java. Doc from java. Returns this reference object's referent. If this reference object has
been cleared, either by the program or by the garbage collector, then
this method returns | |