Class HealthCheck.Builder (2.72.0)

publicstaticfinalclass HealthCheck.BuilderextendsGeneratedMessageV3.Builder<HealthCheck.Builder>implementsHealthCheckOrBuilder

Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.

Protobuf type google.appengine.v1.HealthCheck

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicHealthCheck.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HealthCheck.Builder
Overrides

build()

publicHealthCheckbuild()
Returns
Type Description
HealthCheck

buildPartial()

publicHealthCheckbuildPartial()
Returns
Type Description
HealthCheck

clear()

publicHealthCheck.Builderclear()
Returns
Type Description
HealthCheck.Builder
Overrides

clearCheckInterval()

publicHealthCheck.BuilderclearCheckInterval()

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Returns
Type Description
HealthCheck.Builder

clearDisableHealthCheck()

publicHealthCheck.BuilderclearDisableHealthCheck()

Whether to explicitly disable health checks for this instance.

bool disable_health_check = 1;

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicHealthCheck.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HealthCheck.Builder
Overrides

clearHealthyThreshold()

publicHealthCheck.BuilderclearHealthyThreshold()

Number of consecutive successful health checks required before receiving traffic.

uint32 healthy_threshold = 3;

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

clearHost()

publicHealthCheck.BuilderclearHost()

Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"

string host = 2;

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicHealthCheck.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HealthCheck.Builder
Overrides

clearRestartThreshold()

publicHealthCheck.BuilderclearRestartThreshold()

Number of consecutive failed health checks required before an instance is restarted.

uint32 restart_threshold = 5;

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

clearTimeout()

publicHealthCheck.BuilderclearTimeout()

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Returns
Type Description
HealthCheck.Builder

clearUnhealthyThreshold()

publicHealthCheck.BuilderclearUnhealthyThreshold()

Number of consecutive failed health checks required before removing traffic.

uint32 unhealthy_threshold = 4;

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

clone()

publicHealthCheck.Builderclone()
Returns
Type Description
HealthCheck.Builder
Overrides

getCheckInterval()

publicDurationgetCheckInterval()

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Returns
Type Description
Duration

The checkInterval.

getCheckIntervalBuilder()

publicDuration.BuildergetCheckIntervalBuilder()

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Returns
Type Description
Builder

getCheckIntervalOrBuilder()

publicDurationOrBuildergetCheckIntervalOrBuilder()

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Returns
Type Description
DurationOrBuilder

getDefaultInstanceForType()

publicHealthCheckgetDefaultInstanceForType()
Returns
Type Description
HealthCheck

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisableHealthCheck()

publicbooleangetDisableHealthCheck()

Whether to explicitly disable health checks for this instance.

bool disable_health_check = 1;

Returns
Type Description
boolean

The disableHealthCheck.

getHealthyThreshold()

publicintgetHealthyThreshold()

Number of consecutive successful health checks required before receiving traffic.

uint32 healthy_threshold = 3;

Returns
Type Description
int

The healthyThreshold.

getHost()

publicStringgetHost()

Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"

string host = 2;

Returns
Type Description
String

The host.

getHostBytes()

publicByteStringgetHostBytes()

Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"

string host = 2;

Returns
Type Description
ByteString

The bytes for host.

getRestartThreshold()

publicintgetRestartThreshold()

Number of consecutive failed health checks required before an instance is restarted.

uint32 restart_threshold = 5;

Returns
Type Description
int

The restartThreshold.

getTimeout()

publicDurationgetTimeout()

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Returns
Type Description
Duration

The timeout.

getTimeoutBuilder()

publicDuration.BuildergetTimeoutBuilder()

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Returns
Type Description
Builder

getTimeoutOrBuilder()

publicDurationOrBuildergetTimeoutOrBuilder()

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Returns
Type Description
DurationOrBuilder

getUnhealthyThreshold()

publicintgetUnhealthyThreshold()

Number of consecutive failed health checks required before removing traffic.

uint32 unhealthy_threshold = 4;

Returns
Type Description
int

The unhealthyThreshold.

hasCheckInterval()

publicbooleanhasCheckInterval()

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Returns
Type Description
boolean

Whether the checkInterval field is set.

hasTimeout()

publicbooleanhasTimeout()

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Returns
Type Description
boolean

Whether the timeout field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeCheckInterval(Duration value)

publicHealthCheck.BuildermergeCheckInterval(Durationvalue)

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Parameter
Name Description
value Duration
Returns
Type Description
HealthCheck.Builder

mergeFrom(HealthCheck other)

publicHealthCheck.BuildermergeFrom(HealthCheckother)
Parameter
Name Description
other HealthCheck
Returns
Type Description
HealthCheck.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicHealthCheck.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HealthCheck.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicHealthCheck.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
HealthCheck.Builder
Overrides

mergeTimeout(Duration value)

publicHealthCheck.BuildermergeTimeout(Durationvalue)

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Parameter
Name Description
value Duration
Returns
Type Description
HealthCheck.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalHealthCheck.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HealthCheck.Builder
Overrides

setCheckInterval(Duration value)

publicHealthCheck.BuildersetCheckInterval(Durationvalue)

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Parameter
Name Description
value Duration
Returns
Type Description
HealthCheck.Builder

setCheckInterval(Duration.Builder builderForValue)

publicHealthCheck.BuildersetCheckInterval(Duration.BuilderbuilderForValue)

Interval between health checks.

.google.protobuf.Duration check_interval = 6;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
HealthCheck.Builder

setDisableHealthCheck(boolean value)

publicHealthCheck.BuildersetDisableHealthCheck(booleanvalue)

Whether to explicitly disable health checks for this instance.

bool disable_health_check = 1;

Parameter
Name Description
value boolean

The disableHealthCheck to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicHealthCheck.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HealthCheck.Builder
Overrides

setHealthyThreshold(int value)

publicHealthCheck.BuildersetHealthyThreshold(intvalue)

Number of consecutive successful health checks required before receiving traffic.

uint32 healthy_threshold = 3;

Parameter
Name Description
value int

The healthyThreshold to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setHost(String value)

publicHealthCheck.BuildersetHost(Stringvalue)

Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"

string host = 2;

Parameter
Name Description
value String

The host to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setHostBytes(ByteString value)

publicHealthCheck.BuildersetHostBytes(ByteStringvalue)

Host header to send when performing an HTTP health check. Example: "myapp.appspot.com"

string host = 2;

Parameter
Name Description
value ByteString

The bytes for host to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicHealthCheck.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HealthCheck.Builder
Overrides

setRestartThreshold(int value)

publicHealthCheck.BuildersetRestartThreshold(intvalue)

Number of consecutive failed health checks required before an instance is restarted.

uint32 restart_threshold = 5;

Parameter
Name Description
value int

The restartThreshold to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setTimeout(Duration value)

publicHealthCheck.BuildersetTimeout(Durationvalue)

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Parameter
Name Description
value Duration
Returns
Type Description
HealthCheck.Builder

setTimeout(Duration.Builder builderForValue)

publicHealthCheck.BuildersetTimeout(Duration.BuilderbuilderForValue)

Time before the health check is considered failed.

.google.protobuf.Duration timeout = 7;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
HealthCheck.Builder

setUnhealthyThreshold(int value)

publicHealthCheck.BuildersetUnhealthyThreshold(intvalue)

Number of consecutive failed health checks required before removing traffic.

uint32 unhealthy_threshold = 4;

Parameter
Name Description
value int

The unhealthyThreshold to set.

Returns
Type Description
HealthCheck.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalHealthCheck.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HealthCheck.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.