Class HealthResponse.Builder
java.lang.Object
co.elastic.clients.elasticsearch.cluster.HealthResponse.Builder
- All Implemented Interfaces:
ObjectBuilder<HealthResponse>
- Enclosing class:
- HealthResponse
public static class HealthResponse.Builder extends java.lang.Object implements ObjectBuilder<HealthResponse>
Builder for
HealthResponse
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description HealthResponse.Builder
activePrimaryShards(int value)
Required - The number of active primary shards.HealthResponse.Builder
activeShards(int value)
Required - The total number of active primary and replica shards.HealthResponse.Builder
activeShardsPercentAsNumber(java.lang.String value)
Required - The ratio of active shards in the cluster expressed as a percentage.HealthResponse
build()
Builds aHealthResponse
.HealthResponse.Builder
clusterName(java.lang.String value)
Required - The name of the cluster.HealthResponse.Builder
delayedUnassignedShards(int value)
Required - The number of shards whose allocation has been delayed by the timeout settings.HealthResponse.Builder
indices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)
Setindices(Map)
to a singleton map.HealthResponse.Builder
indices(java.util.Map<java.lang.String,IndexHealthStats> value)
API name:indices
HealthResponse.Builder
initializingShards(int value)
Required - The number of shards that are under initialization.HealthResponse.Builder
numberOfDataNodes(int value)
Required - The number of nodes that are dedicated data nodes.HealthResponse.Builder
numberOfInFlightFetch(int value)
Required - API name:number_of_in_flight_fetch
HealthResponse.Builder
numberOfNodes(int value)
Required - The number of nodes within the cluster.HealthResponse.Builder
numberOfPendingTasks(int value)
Required - The number of cluster-level changes that have not yet been executed.HealthResponse.Builder
putIndices(java.lang.String key, IndexHealthStats value)
Add a key/value toindices(Map)
, creating the map if needed.HealthResponse.Builder
putIndices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)
Add a key/value toindices(Map)
, creating the map if needed.HealthResponse.Builder
relocatingShards(int value)
Required - The number of shards that are under relocation.HealthResponse.Builder
status(Health value)
Required - API name:status
HealthResponse.Builder
taskMaxWaitingInQueueMillis(java.lang.String value)
Required - The time expressed in milliseconds since the earliest initiated task is waiting for being performed.HealthResponse.Builder
timedOut(boolean value)
Required - If false the response returned within the period of time that is specified by the timeout parameter (30s by default)HealthResponse.Builder
unassignedShards(int value)
Required - The number of shards that are not allocated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
activePrimaryShards
Required - The number of active primary shards.API name:
active_primary_shards
-
activeShards
Required - The total number of active primary and replica shards.API name:
active_shards
-
activeShardsPercentAsNumber
Required - The ratio of active shards in the cluster expressed as a percentage.API name:
active_shards_percent_as_number
-
clusterName
Required - The name of the cluster.API name:
cluster_name
-
delayedUnassignedShards
Required - The number of shards whose allocation has been delayed by the timeout settings.API name:
delayed_unassigned_shards
-
indices
public HealthResponse.Builder indices(@Nullable java.util.Map<java.lang.String,IndexHealthStats> value)API name:indices
-
putIndices
Add a key/value toindices(Map)
, creating the map if needed. -
indices
public HealthResponse.Builder indices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)Setindices(Map)
to a singleton map. -
putIndices
public HealthResponse.Builder putIndices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)Add a key/value toindices(Map)
, creating the map if needed. -
initializingShards
Required - The number of shards that are under initialization.API name:
initializing_shards
-
numberOfDataNodes
Required - The number of nodes that are dedicated data nodes.API name:
number_of_data_nodes
-
numberOfInFlightFetch
Required - API name:number_of_in_flight_fetch
-
numberOfNodes
Required - The number of nodes within the cluster.API name:
number_of_nodes
-
numberOfPendingTasks
Required - The number of cluster-level changes that have not yet been executed.API name:
number_of_pending_tasks
-
relocatingShards
Required - The number of shards that are under relocation.API name:
relocating_shards
-
status
Required - API name:status
-
taskMaxWaitingInQueueMillis
Required - The time expressed in milliseconds since the earliest initiated task is waiting for being performed.API name:
task_max_waiting_in_queue_millis
-
timedOut
Required - If false the response returned within the period of time that is specified by the timeout parameter (30s by default)API name:
timed_out
-
unassignedShards
Required - The number of shards that are not allocated.API name:
unassigned_shards
-
build
Builds aHealthResponse
.- Specified by:
build
in interfaceObjectBuilder<HealthResponse>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-