Collection<DistributedObject> distributedObjects) {
int count = 0;
final Config config = instance.getConfig();
final Iterator<DistributedObject> iterator = distributedObjects.iterator();
while (iterator.hasNext() && count < maxVisibleInstanceCount) {
DistributedObject distributedObject = iterator.next();
if (distributedObject instanceof IMap) {
count = handleMap(memberState, count, config, (IMap) distributedObject);
} else if (distributedObject instanceof IQueue) {
count = handleQueue(memberState, count, config, (IQueue) distributedObject);
} else if (distributedObject instanceof ITopic) {
count = handleTopic(memberState, count, config, (ITopic) distributedObject);
} else if (distributedObject instanceof MultiMap) {
count = handleMultimap(memberState, count, config, (MultiMap) distributedObject);
} else if (distributedObject instanceof IExecutorService) {
count = handleExecutorService(memberState, count, config, (IExecutorService) distributedObject);
} else {
LOGGER.finest("Distributed object ignored for monitoring: " + distributedObject.getName());
}
}
if (cacheServiceEnabled) {
final ICacheService cacheService = getCacheService();