@Override public void shutdownNow() { fjPool().shutdownNow(); } }
public JMXForkJoinPoolMonitor(String name, ForkJoinPool fjPool, Map<?, Integer> highContentionObjects) { super(name, fjPool); this.highContentionObjects = highContentionObjects; //super(ForkJoinPoolMXBean.class, true, new NotificationBroadcasterSupport()); this.mbeanName = "co.paralleluniverse:type=SpaceBase,name=" + name + ",monitor=forkJoinPool"; registerMBean(); }
@Override protected ForkJoinPool fjPool() { final ForkJoinPool fjPool = super.fjPool(); if (fjPool == null) { unregister(); throw new RuntimeException("Pool collected"); } return fjPool; }
@Override protected ForkJoinPool fjPool() { final ForkJoinPool fjPool = super.fjPool(); if (fjPool == null) { unregisterMBean(); throw new RuntimeException("Pool collected"); } return fjPool; }
static ForkJoinPoolMonitor createForkJoinPoolMonitor(String name, ForkJoinPool fjPool, MonitorType monitorType) { if (monitorType == null) return null; 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); } }
@Override public long getStealCount() { return fjPool().getStealCount(); }
public JMXForkJoinPoolMonitor(String name, ForkJoinPool fjPool) { super(name, fjPool); //super(ForkJoinPoolMXBean.class, true, new NotificationBroadcasterSupport()); this.mbeanName = "co.paralleluniverse:type=ForkJoinPool,name=" + name; registerMBean(); }
@Override public boolean getAsyncMode() { return fjPool().getAsyncMode(); // Returns true if this pool uses local first-in-first-out scheduling mode for forked tasks that are never joined. }
@Override public void shutdownNow() { fjPool().shutdownNow(); }
@Override public long getQueuedTaskCount() { return fjPool().getQueuedTaskCount(); }
@Override public void shutdown() { fjPool().shutdown(); }
@Override public int getRunningThreadCount() { return fjPool().getRunningThreadCount(); }
@Override public int getQueuedSubmissionCount() { return fjPool().getQueuedSubmissionCount(); }
@Override public void shutdown() { fjPool().shutdown(); }
@Override public int getActiveThreadCount() { return fjPool().getActiveThreadCount(); }
@Override public boolean getAsyncMode() { return fjPool().getAsyncMode(); // Returns true if this pool uses local first-in-first-out scheduling mode for forked tasks that are never joined. }
@Override public int getParallelism() { return fjPool().getParallelism(); // Returns the targeted parallelism level of this pool. }
@Override public int getPoolSize() { return fjPool().getPoolSize(); // Returns the number of worker threads that have started but not yet terminated. }
@Override public int getParalellism() { return fjPool().getParallelism(); // Returns the targeted parallelism level of this pool. }
@Override public int getPoolSize() { return fjPool().getPoolSize(); // Returns the number of worker threads that have started but not yet terminated. }