< prev index next >
src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java
Print this page
*** 23,39 ****
* questions.
*/
package jdk.internal.misc;
public interface JavaLangRefAccess {
/**
! * Help ReferenceHandler thread process next pending
! * {@link java.lang.ref.Reference}
*
! * @return {@code true} if there was a pending reference and it
! * was enqueue-ed or {@code false} if there was no
! * pending reference
*/
! boolean tryHandlePendingReference();
}
--- 23,48 ----
* questions.
*/
package jdk.internal.misc;
+ import java.lang.ref.Cleaner;
+
public interface JavaLangRefAccess {
/**
! * Enqueue pending {@link java.lang.ref.Reference}s if GC has discovered any.<p>
! * This method does not return until all references that had been discovered
! * by the time this method was called, are enqueued even if some of them are
! * being enqueued concurrently by other threads.
! */
! void enqueuePendingReferences();
!
! /**
! * Processes next Cleanable that has been waiting in the queue maintained
! * by given {@code cleaner}.
*
! * @return {@code true} if a Cleanable was found in the queue and
! * was processed or {@code false} if the queue was empty.
*/
! boolean cleanNextEnqueuedCleanable(Cleaner cleaner);
}
< prev index next >