|
|
@@ -11,10 +11,8 @@ package org.elasticsearch.indices;
|
|
|
|
|
|
import org.elasticsearch.action.OriginalIndices;
|
|
|
import org.elasticsearch.action.support.IndicesOptions;
|
|
|
-import org.elasticsearch.common.Strings;
|
|
|
|
|
|
import java.util.Map;
|
|
|
-import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* Interface for grouping index expressions, along with IndicesOptions by cluster alias.
|
|
|
@@ -30,36 +28,7 @@ import java.util.Set;
|
|
|
public interface IndicesExpressionGrouper {
|
|
|
|
|
|
/**
|
|
|
- * @param remoteClusterNames Set of configured remote cluster names.
|
|
|
- * @param indicesOptions IndicesOptions to clarify how the index expression should be parsed/applied
|
|
|
- * @param indexExpressionCsv Multiple index expressions as CSV string (with no spaces), e.g., "logs1,logs2,cluster-a:logs1".
|
|
|
- * A single index expression is also supported.
|
|
|
- * @return Map where the key is the cluster alias (for "local" cluster, it is RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY)
|
|
|
- * and the value for that cluster from the index expression is an OriginalIndices object.
|
|
|
+ * See {@link org.elasticsearch.transport.RemoteClusterService#groupIndices} for details
|
|
|
*/
|
|
|
- default Map<String, OriginalIndices> groupIndices(
|
|
|
- Set<String> remoteClusterNames,
|
|
|
- IndicesOptions indicesOptions,
|
|
|
- String indexExpressionCsv
|
|
|
- ) {
|
|
|
- return groupIndices(remoteClusterNames, indicesOptions, Strings.splitStringByCommaToArray(indexExpressionCsv));
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Same behavior as the other groupIndices, except the incoming multiple index expressions must already be
|
|
|
- * parsed into a String array.
|
|
|
- * @param remoteClusterNames Set of configured remote cluster names.
|
|
|
- * @param indicesOptions IndicesOptions to clarify how the index expressions should be parsed/applied
|
|
|
- * @param indexExpressions Multiple index expressions as string[].
|
|
|
- * @return Map where the key is the cluster alias (for "local" cluster, it is RemoteClusterAware.LOCAL_CLUSTER_GROUP_KEY)
|
|
|
- * and the value for that cluster from the index expression is an OriginalIndices object.
|
|
|
- */
|
|
|
- Map<String, OriginalIndices> groupIndices(Set<String> remoteClusterNames, IndicesOptions indicesOptions, String[] indexExpressions);
|
|
|
-
|
|
|
- /**
|
|
|
- * Returns a set of currently configured remote clusters.
|
|
|
- */
|
|
|
- default Set<String> getConfiguredClusters() {
|
|
|
- return Set.of();
|
|
|
- }
|
|
|
+ Map<String, OriginalIndices> groupIndices(IndicesOptions indicesOptions, String[] indexExpressions, boolean returnLocalAll);
|
|
|
}
|