FinalizableReference#finalizeReferent() on them.
Keep a strong reference to this object until all of the associated referents have been
finalized. If this object is garbage collected earlier, the backing thread will not invoke finalizeReferent() on the remaining references.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | FinalizableReferenceQueue.
Try to load Finalizer in its own class loader. |
| pack-priv static class | FinalizableReferenceQueue.
Loads Finalizer directly using the current class loader. |
| pack-priv static interface | FinalizableReferenceQueue.
Loads Finalizer.class. |
| pack-priv static class | FinalizableReferenceQueue.
Tries to load Finalizer from the system class loader. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final Map | |
| private static final Logger | |
| pack-priv final ReferenceQueue | queue
The actual reference queue that our background thread will poll. |
| private static final Method | startFinalizer
Reference to Finalizer.startFinalizer(). |
| pack-priv final boolean | threadStarted
Whether or not the background thread started successfully. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | cleanUp()
Repeatedly dequeues references from the queue and invokes |
| public static void | |
| pack-priv static Method | |
| private static Class | Returns: Finalizer.classIterates through the given loaders until it finds one that can load Finalizer. |
| private void |
| FINALIZER_CLASS_NAME | back to summary |
|---|---|
| private static final String FINALIZER_CLASS_NAME | |
| finalizerQueues | back to summary |
|---|---|
| private static final Map<FinalizableReferenceQueue, Boolean> finalizerQueues | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| queue | back to summary |
|---|---|
| pack-priv final ReferenceQueue<Object> queue The actual reference queue that our background thread will poll. | |
| startFinalizer | back to summary |
|---|---|
| private static final Method startFinalizer Reference to Finalizer.startFinalizer(). | |
| threadStarted | back to summary |
|---|---|
| pack-priv final boolean threadStarted Whether or not the background thread started successfully. | |
| FinalizableReferenceQueue | back to summary |
|---|---|
| public FinalizableReferenceQueue() Constructs a new queue.
| |
| cleanUp | back to summary |
|---|---|
| pack-priv void cleanUp() Repeatedly dequeues references from the queue and invokes | |
| cleanUpAll | back to summary |
|---|---|
| public static void cleanUpAll() | |
| getStartFinalizer | back to summary |
|---|---|
| pack-priv static Method getStartFinalizer(Class<?> finalizer) Looks up Finalizer.startFinalizer(). | |
| loadFinalizer | back to summary |
|---|---|
| private static Class Iterates through the given loaders until it finds one that can load Finalizer.
| |
| pollReferenceQueue | back to summary |
|---|---|
| private void pollReferenceQueue() | |
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv URL | |
| public Class | loadFinalizer()
Implements jnr. |
| pack-priv URLClassLoader |
| LOADING_ERROR | back to summary |
|---|---|
| private static final String LOADING_ERROR | |
| DecoupledLoader | back to summary |
|---|---|
| pack-priv DecoupledLoader() | |
| getBaseUrl | back to summary |
|---|---|
| pack-priv URL getBaseUrl() throws IOException Gets URL for base of path containing Finalizer.class. | |
| loadFinalizer | back to summary |
|---|---|
| public Class Implements jnr. Doc from jnr. Returns Finalizer.class or null if this loader shouldn't or can't load it.
| |
| newLoader | back to summary |
|---|---|
| pack-priv URLClassLoader newLoader(URL base) Creates a class loader with the given base URL as its classpath. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Class | loadFinalizer()
Implements jnr. |
| DirectLoader | back to summary |
|---|---|
| pack-priv DirectLoader() | |
| loadFinalizer | back to summary |
|---|---|
| public Class Implements jnr. Doc from jnr. Returns Finalizer.class or null if this loader shouldn't or can't load it.
| |
| Modifier and Type | Method and Description |
|---|---|
| public Class |
| loadFinalizer | back to summary |
|---|---|
| public Class Returns Finalizer.class or null if this loader shouldn't or can't load it.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Class | loadFinalizer()
Implements jnr. |
| SystemLoader | back to summary |
|---|---|
| pack-priv SystemLoader() | |
| loadFinalizer | back to summary |
|---|---|
| public Class Implements jnr. Doc from jnr. Returns Finalizer.class or null if this loader shouldn't or can't load it.
| |