use of org.infinispan.jmx.annotations.ManagedAttribute in project infinispan by infinispan.
the class RpcManagerImpl method getPendingViewAsString.
@ManagedAttribute(description = "Retrieves the pending view.", displayName = "Pending view", dataType = DataType.TRAIT)
public String getPendingViewAsString() {
CacheTopology cacheTopology = distributionManager.getCacheTopology();
if (cacheTopology == null)
return "N/A";
ConsistentHash pendingCH = cacheTopology.getPendingCH();
return pendingCH != null ? pendingCH.getMembers().toString() : "null";
}
use of org.infinispan.jmx.annotations.ManagedAttribute in project infinispan by infinispan.
the class NettyTransport method getPendingTasks.
@ManagedAttribute(description = "Returns the number of pending tasks.", displayName = "Pending tasks")
@Override
public int getPendingTasks() {
AtomicInteger count = new AtomicInteger(0);
ioGroup.forEach(ee -> count.addAndGet(((SingleThreadEventExecutor) ee).pendingTasks()));
return count.get();
}
Aggregations