static ForkJoinPoolMonitor createForkJoinPoolMonitor(String name, ForkJoinPool fjPool, MonitorType monitorType) {
switch (monitorType) {
case JMX:
return new JMXForkJoinPoolMonitor(name, fjPool);
case METRICS:
return new MetricsForkJoinPoolMonitor(name, fjPool);
case NONE:
return null;
default:
throw new RuntimeException("Unsupported monitor type: " + monitorType);
}