Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.Random;
import java.util.Collection;

import javax.cache.Cache;
import javax.cache.CacheManager;
Expand Down Expand Up @@ -1211,4 +1212,19 @@ public boolean deregisterSubCluster(SubClusterId subClusterId,
}
return false;
}

/**
* Get active subclusters.
*
* @return We will return a list of active subclusters as a Collection.
*/
public Collection<SubClusterInfo> getActiveSubClusters() {
try {
Map<SubClusterId, SubClusterInfo> subClusterMap = getSubClusters(true);
return subClusterMap.values();
} catch (Exception e) {
LOG.error("getSubClustersCollection failed.", e);
return null;
}
}
}
Loading