static RemoteStatListenerImpl create(int listenerId, InternalDistributedMember recipient, long resourceId, String statName, HostStatSampler sampler) { RemoteStatListenerImpl result = null; Statistics stats = sampler.getStatisticsManager().findStatisticsByUniqueId(resourceId); if (stats == null) { throw new RuntimeException(
public static FetchResourceAttributesResponse create(DistributionManager dm, InternalDistributedMember recipient, long rsrcUniqueId) { FetchResourceAttributesResponse m = new FetchResourceAttributesResponse(); m.setRecipient(recipient); Statistics s = null; InternalDistributedSystem ds = dm.getSystem(); s = ds.getStatisticsManager().findStatisticsByUniqueId(rsrcUniqueId); if (s != null) { StatisticsType type = s.getType(); StatisticDescriptor[] tmp = type.getStatistics(); m.stats = new RemoteStat[tmp.length]; for (int i = 0; i < tmp.length; i++) { m.stats[i] = new RemoteStat(s, tmp[i]); } } if (m.stats == null) { m.stats = new RemoteStat[0]; } return m; }