Interface IndicesExpressionGrouper

All Known Implementing Classes:
RemoteClusterService

public interface IndicesExpressionGrouper
Interface for grouping index expressions, along with IndicesOptions by cluster alias. Implementations should support the following: - plain index names - cluster:index notation - date math expression, including date math prefixed by a clusterAlias - wildcards - multiple index expressions (e.g., logs1,logs2,cluster-a:logs*) Note: these methods do not resolve index expressions to concrete indices.
  • Method Details

    • groupIndices

      default Map<String,OriginalIndices> groupIndices(Set<String> remoteClusterNames, IndicesOptions indicesOptions, String indexExpressionCsv)
      Parameters:
      remoteClusterNames - Set of configured remote cluster names.
      indicesOptions - IndicesOptions to clarify how the index expression should be parsed/applied
      indexExpressionCsv - Multiple index expressions as CSV string (with no spaces), e.g., "logs1,logs2,cluster-a:logs1". A single index expression is also supported.
      Returns:
      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.
    • groupIndices

      Map<String,OriginalIndices> groupIndices(Set<String> remoteClusterNames, IndicesOptions indicesOptions, String[] indexExpressions)
      Same behavior as the other groupIndices, except the incoming multiple index expressions must already be parsed into a String array.
      Parameters:
      remoteClusterNames - Set of configured remote cluster names.
      indicesOptions - IndicesOptions to clarify how the index expressions should be parsed/applied
      indexExpressions - Multiple index expressions as string[].
      Returns:
      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.
    • getConfiguredClusters

      default Set<String> getConfiguredClusters()
      Returns a set of currently configured remote clusters.