Skip to content

Commit

Permalink
Merge pull request #20365 from keithc-ca/virtual
Browse files Browse the repository at this point in the history
Add support for VirtualThreadSchedulerMXBean
  • Loading branch information
pshipton authored Oct 16, 2024
2 parents 85753ad + 945b108 commit d38a818
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
import com.sun.management.HotSpotDiagnosticMXBean;
/*[ENDIF] JAVA_SPEC_VERSION >= 21 */

/*[IF JAVA_SPEC_VERSION >= 24]*/
import com.sun.management.internal.VirtualThreadSchedulerImpls;
import jdk.management.VirtualThreadSchedulerMXBean;
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

/**
* This class implements the service-provider interface to make OpenJ9-specific
* MXBeans available. These beans are either in addition to the basic set or
Expand Down Expand Up @@ -118,6 +123,12 @@ public final class PlatformMBeanProvider extends sun.management.spi.PlatformMBea
.register(allComponents);
/*[ENDIF] JAVA_SPEC_VERSION >= 21 */

/*[IF JAVA_SPEC_VERSION >= 24]*/
ComponentBuilder.create("jdk.management:type=VirtualThreadScheduler", VirtualThreadSchedulerImpls.create()) //$NON-NLS-1$
.addInterface(VirtualThreadSchedulerMXBean.class)
.register(allComponents);
/*[ENDIF] JAVA_SPEC_VERSION >= 24 */

// register beans with zero or more instances

{
Expand Down

0 comments on commit d38a818

Please sign in to comment.