Class ClusterHealthRequest

    • Constructor Detail

      • ClusterHealthRequest

        public ClusterHealthRequest()
      • ClusterHealthRequest

        public ClusterHealthRequest​(java.lang.String... indices)
    • Method Detail

      • indices

        public java.lang.String[] indices()
        Description copied from interface: IndicesRequest
        Returns the array of indices that the action relates to
        Specified by:
        indices in interface IndicesRequest
      • indicesOptions

        public IndicesOptions indicesOptions()
        Description copied from interface: IndicesRequest
        Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
        Specified by:
        indicesOptions in interface IndicesRequest
      • waitForNoRelocatingShards

        public boolean waitForNoRelocatingShards()
      • waitForNoRelocatingShards

        public ClusterHealthRequest waitForNoRelocatingShards​(boolean waitForNoRelocatingShards)
        Sets whether the request should wait for there to be no relocating shards before retrieving the cluster health status. Defaults to false, meaning the operation does not wait on there being no more relocating shards. Set to true to wait until the number of relocating shards in the cluster is 0.
      • waitForNoInitializingShards

        public boolean waitForNoInitializingShards()
      • waitForNoInitializingShards

        public ClusterHealthRequest waitForNoInitializingShards​(boolean waitForNoInitializingShards)
        Sets whether the request should wait for there to be no initializing shards before retrieving the cluster health status. Defaults to false, meaning the operation does not wait on there being no more initializing shards. Set to true to wait until the number of initializing shards in the cluster is 0.
      • waitForActiveShards

        public ClusterHealthRequest waitForActiveShards​(ActiveShardCount waitForActiveShards)
        Sets the number of shard copies that must be active across all indices before getting the health status. Defaults to ActiveShardCount.NONE, meaning we don't wait on any active shards. Set this value to ActiveShardCount.ALL to wait for all shards (primary and all replicas) to be active across all indices in the cluster. Otherwise, use ActiveShardCount.from(int) to set this value to any non-negative integer, up to the total number of shard copies to wait for.
      • waitForNodes

        public java.lang.String waitForNodes()
      • waitForNodes

        public ClusterHealthRequest waitForNodes​(java.lang.String waitForNodes)
        Waits for N number of nodes. Use "12" for exact mapping, ">12" and "<12" for range.
      • waitForEvents

        public Priority waitForEvents()
      • level

        public void level​(ClusterHealthRequest.Level level)
        Set the level of detail for the health information to be returned. Only used by the high-level REST Client The default value is 'shards' so it is backward compatible with the transport client behaviour.
      • level

        public ClusterHealthRequest.Level level()
        Get the level of detail for the health information to be returned. Only used by the high-level REST Client. The default value is 'shards' so it is backward compatible with the transport client behaviour.