Class HealthResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<HealthResponse.Builder>
co.elastic.clients.elasticsearch.cluster.HealthResponse.Builder
- All Implemented Interfaces:
WithJson<HealthResponse.Builder>,ObjectBuilder<HealthResponse>
- Enclosing class:
- HealthResponse
public static class HealthResponse.Builder
extends WithJsonObjectBuilderBase<HealthResponse.Builder>
implements ObjectBuilder<HealthResponse>
Builder for
HealthResponse.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal HealthResponse.BuilderactivePrimaryShards(int value) Required - The number of active primary shards.final HealthResponse.BuilderactiveShards(int value) Required - The total number of active primary and replica shards.final HealthResponse.BuilderRequired - The ratio of active shards in the cluster expressed as a percentage.build()Builds aHealthResponse.final HealthResponse.BuilderclusterName(String value) Required - The name of the cluster.final HealthResponse.BuilderdelayedUnassignedShards(int value) Required - The number of shards whose allocation has been delayed by the timeout settings.final HealthResponse.Builderindices(String key, IndexHealthStats value) API name:indicesfinal HealthResponse.BuilderAPI name:indicesfinal HealthResponse.Builderindices(Map<String, IndexHealthStats> map) API name:indicesfinal HealthResponse.BuilderinitializingShards(int value) Required - The number of shards that are under initialization.final HealthResponse.BuildernumberOfDataNodes(int value) Required - The number of nodes that are dedicated data nodes.final HealthResponse.BuildernumberOfInFlightFetch(int value) Required - API name:number_of_in_flight_fetchfinal HealthResponse.BuildernumberOfNodes(int value) Required - The number of nodes within the cluster.final HealthResponse.BuildernumberOfPendingTasks(int value) Required - The number of cluster-level changes that have not yet been executed.final HealthResponse.BuilderrelocatingShards(int value) Required - The number of shards that are under relocation.protected HealthResponse.Builderself()final HealthResponse.Builderstatus(HealthStatus value) Required - API name:statusfinal HealthResponse.BuilderRequired - The time expressed in milliseconds since the earliest initiated task is waiting for being performed.final HealthResponse.BuildertimedOut(boolean value) Required - If false the response returned within the period of time that is specified by the timeout parameter (30s by default)final HealthResponse.BuilderunassignedShards(int value) Required - The number of shards that are not allocated.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
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
API name:indicesAdds all entries of
maptoindices. -
indices
API name:indicesAdds an entry to
indices. -
indices
public final HealthResponse.Builder indices(String key, Function<IndexHealthStats.Builder, ObjectBuilder<IndexHealthStats>> fn) API name:indicesAdds an entry to
indicesusing a builder lambda. -
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 -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<HealthResponse.Builder>
-
build
Builds aHealthResponse.- Specified by:
buildin interfaceObjectBuilder<HealthResponse>- Throws:
NullPointerException- if some of the required fields are null.
-