use of org.apache.geode.management.internal.cli.functions.ListDiskStoresFunction in project geode by apache.
the class DiskStoreCommands method getDiskStoreListing.
@SuppressWarnings("unchecked")
protected List<DiskStoreDetails> getDiskStoreListing(Set<DistributedMember> members) {
final Execution membersFunctionExecutor = getMembersFunctionExecutor(members);
if (membersFunctionExecutor instanceof AbstractExecution) {
((AbstractExecution) membersFunctionExecutor).setIgnoreDepartedMembers(true);
}
final ResultCollector<?, ?> resultCollector = membersFunctionExecutor.execute(new ListDiskStoresFunction());
final List<?> results = (List<?>) resultCollector.getResult();
final List<DiskStoreDetails> distributedSystemMemberDiskStores = new ArrayList<DiskStoreDetails>(results.size());
for (final Object result : results) {
if (result instanceof Set) {
// ignore FunctionInvocationTargetExceptions and other
// Exceptions...
distributedSystemMemberDiskStores.addAll((Set<DiskStoreDetails>) result);
}
}
Collections.sort(distributedSystemMemberDiskStores);
return distributedSystemMemberDiskStores;
}
Aggregations