@ManagementOperation(description="Obtain a formatted statistics report", impact=Impact.ReadOnly, params={@ManagementParameter(name="formatClassName",description="The StatisticsFormatter class name")}) public Object listFormattedSubPoolStatistics(String formatClassName) { final JBossStatistics stats = (JBossStatistics)listStatistics(); final ClassLoader cl = Thread.currentThread().getContextClassLoader(); Class clazz; StatisticsFormatter formatter = null; try { clazz = cl.loadClass(formatClassName); formatter = (StatisticsFormatter)clazz.newInstance(); } catch (Exception e) { log.warn("warn: statistics formatter not found, setting to " + statisticsFormatter); formatter = new JBossDefaultSubPoolStatisticFormatter(); } return formatter.formatStatistics(stats); }
@ManagementOperation(description="Returns whether the DistributedReplicantManager considers this node to be the master for the given service", impact=Impact.ReadOnly, params={@ManagementParameter(name="key", description="The name of the service")}) public boolean isDRMMasterForService(String key) { DistributedReplicantManagerImpl drm = getDistributedReplicantManagerImpl(); return drm == null ? null : drm.isMasterReplica(key); }
@ManagementOperation(description="Returns the names of the nodes that have registered objects with the DistributedReplicantManager under the given key", impact=Impact.ReadOnly, params={@ManagementParameter(name="key", description="The name of the service")}) public List<String> lookupDRMNodeNames(String key) { DistributedReplicantManagerImpl drm = getDistributedReplicantManagerImpl(); return drm == null ? null : drm.lookupReplicantsNodeNames(key); }
@ManagementOperation(description="Returns a hash of the list of nodes that " + "have registered an object with the DistributedReplicantManager under the given key", impact=Impact.ReadOnly, params={@ManagementParameter(name="key", description="The name of the service")}) public int getDRMServiceViewId(String key) { DistributedReplicantManagerImpl drm = getDistributedReplicantManagerImpl(); return drm == null ? null : drm.getReplicantsViewId(key); }