diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/GroupList.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/GroupList.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/GroupList.java b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/GroupList.java new file mode 100644 index 00000000000..7d625f55cb6 --- /dev/null +++ b/container-search/src/main/java/com/yahoo/search/dispatch/searchcluster/GroupList.java @@ -0,0 +1,18 @@ +package com.yahoo.search.dispatch.searchcluster; + +import java.util.Collection; +import java.util.Set; + +/** + * Simple interface for groups and their nodes in the content cluster + * @author baldersheim + */ +public interface GroupList { + Group group(int id); + Set<Integer> groupKeys(); + Collection<Group> groups(); + default boolean isEmpty() { + return numGroups() == 0; + } + int numGroups(); +} |