Top Description Fields Constructors Methods
jdk.vm.ci.hotspot

pack-priv final Class HandleCleaner

extends Cleaner
Class Inheritance
Static Imports
jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE

This class manages a set of jobject and jmetadata handles whose lifetimes are dependent on associated IndirectHotSpotObjectConstantImpl and MetaspaceHandleObject wrapper objects respectively. The general theory of operation is that all wrappers are created by calling into the VM which calls back out to actually create the wrapper instance. During the call the VM keeps the object or metadata reference alive through the use of handles. Once the call completes the wrapper object is registered here and will be scanned during metadata scanning. The weakness of the reference to the wrapper object allows the handles to be reclaimed when they are no longer used.

Field Summary

Modifier and TypeField and Description
private final long
handle

A jmetadata or jobject handle.

private final boolean
isJObject

Specifies if handle is a jobject or jmetadata.

Constructor Summary

AccessConstructor and Description
private
HandleCleaner(Object wrapper, long handle, boolean isJObject)

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
create(Object wrapper, long handle)

Registers a cleaner for handle.

pack-priv boolean
doCleanup()

Implements abstract jdk.vm.ci.hotspot.Cleaner.doCleanup.

Releases the resource associated with this.handle.
Inherited from jdk.vm.ci.hotspot.Cleaner:
clean

Field Detail

handleback to summary
private final long handle

A jmetadata or jobject handle.

isJObjectback to summary
private final boolean isJObject

Specifies if handle is a jobject or jmetadata.

Constructor Detail

HandleCleanerback to summary
private HandleCleaner(Object wrapper, long handle, boolean isJObject)

Method Detail

createback to summary
pack-priv static void create(Object wrapper, long handle)

Registers a cleaner for handle. The cleaner will release the handle some time after wrapper is detected as unreachable by the garbage collector.

Annotations
@SuppressWarnings:unused
doCleanupback to summary
pack-priv boolean doCleanup()

Implements abstract jdk.vm.ci.hotspot.Cleaner.doCleanup.

Releases the resource associated with this.handle.

Returns:boolean

Doc from jdk.vm.ci.hotspot.Cleaner.doCleanup.

true if the clean up action cleared the referent of an oop handle and requires a subsequent call to CompilerToVM#releaseClearedOopHandles() to reclaim the resources of the handle itself

Annotations
@Override