performCleanup() method
to provide the cleaning action.
When constructed, the object reference and the Cleanable
are registered with the Cleaner.
The Cleaner invokes clean after the
referent becomes phantom reachable.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | index
Index of this PhantomCleanable in the list node. |
| private final CleanerImpl. | list
The list of PhantomCleanable; synchronizes insert and remove. |
| pack-priv CleanerImpl. | node
Node for this PhantomCleanable in the list. |
| Access | Constructor and Description |
|---|---|
| public | PhantomCleanable(T
the referent to track referent, Cleaner the cleaner)Cleaner to register withConstructs new |
| Modifier and Type | Method and Description |
|---|---|
| public final void | clean()
Implements java. Unregister this PhantomCleanable and invoke |
| public void | clear()
Overrides java. Unregister this PhantomCleanable and clear the reference. |
| public final boolean | enqueue()
Overrides java. This method always throws |
| public final boolean | isEnqueued()
Overrides java. This method always throws |
| protected abstract void |
| index | back to summary |
|---|---|
| pack-priv int index Index of this PhantomCleanable in the list node. Synchronized by the same lock as the list itself. | |
| list | back to summary |
|---|---|
| private final CleanerImpl. The list of PhantomCleanable; synchronizes insert and remove. | |
| node | back to summary |
|---|---|
| pack-priv CleanerImpl. Node for this PhantomCleanable in the list. Synchronized by the same lock as the list itself. | |
| PhantomCleanable | back to summary |
|---|---|
| public PhantomCleanable(T referent, Cleaner cleaner) Constructs new
| |
| clean | back to summary |
|---|---|
| public final void clean() Implements java. Unregister this PhantomCleanable and invoke
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides java. Unregister this PhantomCleanable and clear the reference.
Due to inherent concurrency,
| |
| enqueue | back to summary |
|---|---|
| public final boolean enqueue() Overrides java. This method always throws
| |
| isEnqueued | back to summary |
|---|---|
| public final boolean isEnqueued() Overrides java. This method always throws
| |
| performCleanup | back to summary |
|---|---|
| protected abstract void performCleanup() The | |