use of org.apache.geode.Statistics in project geode by apache.
the class InternalDistributedSystem method createOsStatistics.
public Statistics createOsStatistics(StatisticsType type, String textId, long numericId, int osStatFlags) {
if (this.statsDisabled) {
return new DummyStatisticsImpl(type, textId, numericId);
}
long myUniqueId = statsListUniqueId.getAndIncrement();
Statistics result = new LocalStatisticsImpl(type, textId, numericId, myUniqueId, false, osStatFlags, this);
synchronized (statsList) {
statsList.add(result);
statsListModCount++;
}
return result;
}
use of org.apache.geode.Statistics in project geode by apache.
the class InternalDistributedSystem method findStatisticsByNumericId.
public Statistics[] findStatisticsByNumericId(final long numericId) {
final ArrayList hits = new ArrayList();
visitStatistics(new StatisticsVisitor() {
public void visit(Statistics s) {
if (numericId == s.getNumericId()) {
hits.add(s);
}
}
});
Statistics[] result = new Statistics[hits.size()];
return (Statistics[]) hits.toArray(result);
}
use of org.apache.geode.Statistics in project geode by apache.
the class InternalDistributedSystem method findStatisticsByTextId.
public Statistics[] findStatisticsByTextId(final String textId) {
final ArrayList hits = new ArrayList();
visitStatistics(new StatisticsVisitor() {
public void visit(Statistics s) {
if (s.getTextId().equals(textId)) {
hits.add(s);
}
}
});
Statistics[] result = new Statistics[hits.size()];
return (Statistics[]) hits.toArray(result);
}
use of org.apache.geode.Statistics in project geode by apache.
the class MemberLevelDiskMonitor method stopListener.
@Override
public void stopListener() {
for (Statistics stat : listeners.keySet()) {
ValueMonitor monitor = monitors.get(stat);
monitor.removeListener(listeners.get(stat));
monitor.removeStatistics(stat);
}
listeners.clear();
monitors.clear();
}
use of org.apache.geode.Statistics in project geode by apache.
the class MemberMBeanBridge method addDistributionStats.
public void addDistributionStats(DistributionStats distributionStats) {
Statistics dsStats = distributionStats.getStats();
monitor.addStatisticsToMonitor(dsStats);
}
Aggregations