Class HealthResponse.Builder
java.lang.Object
org.opensearch.client.opensearch.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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.client.util.ObjectBuilder
ObjectBuilder.Constant<V> -
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description HealthResponse.BuilderactivePrimaryShards(java.lang.Number value)The number of active primary shards.HealthResponse.BuilderactiveShards(java.lang.Number value)The total number of active primary and replica shards.HealthResponse.BuilderactiveShardsPercentAsNumber(jakarta.json.JsonValue value)The ratio of active shards in the cluster expressed as a percentage.HealthResponsebuild()Builds aHealthResponse.HealthResponse.BuilderclusterName(java.lang.String value)The name of the cluster.HealthResponse.BuilderdelayedUnassignedShards(java.lang.Number value)The number of shards whose allocation has been delayed by the timeout settings.HealthResponse.Builderindices(java.lang.String key, java.util.function.Function<IndexHealthStats.Builder,ObjectBuilder<IndexHealthStats>> fn)Setindices(Map)to a singleton map.HealthResponse.Builderindices(java.util.Map<java.lang.String,IndexHealthStats> value)API name:indicesHealthResponse.BuilderinitializingShards(java.lang.Number value)The number of shards that are under initialization.HealthResponse.BuildernumberOfDataNodes(java.lang.Number value)The number of nodes that are dedicated data nodes.HealthResponse.BuildernumberOfInFlightFetch(java.lang.Number value)API name:number_of_in_flight_fetchHealthResponse.BuildernumberOfNodes(java.lang.Number value)The number of nodes within the cluster.HealthResponse.BuildernumberOfPendingTasks(java.lang.Number value)The number of cluster-level changes that have not yet been executed.HealthResponse.BuilderputIndices(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.BuilderputIndices(java.lang.String key, IndexHealthStats value)Add a key/value toindices(Map), creating the map if needed.HealthResponse.BuilderrelocatingShards(java.lang.Number value)The number of shards that are under relocation.HealthResponse.Builderstatus(jakarta.json.JsonValue value)API name:statusHealthResponse.BuildertaskMaxWaitingInQueueMillis(jakarta.json.JsonValue value)The time expressed in milliseconds since the earliest initiated task is waiting for being performed.HealthResponse.BuildertimedOut(java.lang.Boolean value)If false the response returned within the period of time that is specified by the timeout parameter (30s by default) API name:timed_outHealthResponse.BuilderunassignedShards(java.lang.Number value)The number of shards that are not allocated.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
activePrimaryShards
The number of active primary shards. API name:active_primary_shards -
activeShards
The total number of active primary and replica shards. API name:active_shards -
activeShardsPercentAsNumber
The ratio of active shards in the cluster expressed as a percentage. API name:active_shards_percent_as_number -
clusterName
The name of the cluster. API name:cluster_name -
delayedUnassignedShards
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
The number of shards that are under initialization. API name:initializing_shards -
numberOfDataNodes
The number of nodes that are dedicated data nodes. API name:number_of_data_nodes -
numberOfInFlightFetch
API name:number_of_in_flight_fetch -
numberOfNodes
The number of nodes within the cluster. API name:number_of_nodes -
numberOfPendingTasks
The number of cluster-level changes that have not yet been executed. API name:number_of_pending_tasks -
relocatingShards
The number of shards that are under relocation. API name:relocating_shards -
status
API name:status -
taskMaxWaitingInQueueMillis
The time expressed in milliseconds since the earliest initiated task is waiting for being performed. API name:task_max_waiting_in_queue_millis -
timedOut
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
The number of shards that are not allocated. API name:unassigned_shards -
build
Builds aHealthResponse.- Specified by:
buildin interfaceObjectBuilder<HealthResponse>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-