Class HttpShardHandlerFactory.WhitelistHostChecker

  • Enclosing class:

    public static class HttpShardHandlerFactory.WhitelistHostChecker
    extends Object
    Class used to validate the hosts in the "shards" parameter when doing a distributed request
    • Constructor Detail

      • WhitelistHostChecker

        public WhitelistHostChecker​(String whitelistStr,
                                    boolean enabled)
    • Method Detail

      • checkWhitelist

        protected void checkWhitelist​(ClusterState clusterState,
                                      String shardsParamValue,
                                      List<String> shardUrls)
        Checks that all the hosts for all the shards requested in shards parameter exist in the configured whitelist or in the ClusterState (in case of cloud mode)
        clusterState - The up to date ClusterState, can be null in case of non-cloud mode
        shardsParamValue - The original shards parameter
        shardUrls - The list of cores generated from the shards parameter.
      • hasExplicitWhitelist

        public boolean hasExplicitWhitelist()
      • isWhitelistHostCheckingEnabled

        public boolean isWhitelistHostCheckingEnabled()