Class ClusterRerouteRequest

    • Constructor Detail

      • ClusterRerouteRequest

        public ClusterRerouteRequest()
    • Method Detail

      • add

        public ClusterRerouteRequest add​(AllocationCommand... commands)
        Adds allocation commands to be applied to the cluster. Note, can be empty, in which case will simply run a simple "reroute".
      • dryRun

        public ClusterRerouteRequest dryRun​(boolean dryRun)
        Sets a dry run flag (defaults to false) allowing to run the commands without actually applying them to the cluster state, and getting the resulting cluster state back.
      • dryRun

        public boolean dryRun()
        Returns the current dry run flag which allows to run the commands without actually applying them, just to get back the resulting cluster state back.
      • explain

        public ClusterRerouteRequest explain​(boolean explain)
        Sets the explain flag, which will collect information about the reroute request without executing the actions. Similar to dryRun, but human-readable.
      • setRetryFailed

        public ClusterRerouteRequest setRetryFailed​(boolean retryFailed)
        Sets the retry failed flag (defaults to false). If true, the request will retry allocating shards that can't currently be allocated due to too many allocation failures.
      • explain

        public boolean explain()
        Returns the current explain flag
      • isRetryFailed

        public boolean isRetryFailed()
        Returns the current retry failed flag
      • getCommands

        public AllocationCommands getCommands()
        Returns the allocation commands to execute
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object