< prev index next >
src/java.base/share/classes/jdk/internal/misc/JavaLangRefAccess.java
Print this page
*** 26,39 ****
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();
}
--- 26,46 ----
package jdk.internal.misc;
public interface JavaLangRefAccess {
/**
! * Triggers discovery of new Reference(s) and returns the phase sequence number
! * in which they were discovered or previous phase sequence number if no new
! * Reference(s) were discovered.
! */
! int discoverReferences();
!
! /**
! * Blocks until all Reference(s) that were discovered in given
! * {@code discoveryPhase} (as returned by {@link #discoverReferences()})
! * have been enqueued.
*
! * @param discoveryPhase the discovery phase sequence number.
! * @throws InterruptedException if interrupted while waiting.
*/
! void awaitReferencesEnqueued(int discoveryPhase) throws InterruptedException;
}
< prev index next >