Package io.grpc.serviceconfig
Class MethodConfig.HedgingPolicy
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- io.grpc.serviceconfig.MethodConfig.HedgingPolicy
-
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,MethodConfig.HedgingPolicyOrBuilder,Serializable
- Enclosing class:
- MethodConfig
public static final class MethodConfig.HedgingPolicy extends com.google.protobuf.GeneratedMessageV3 implements MethodConfig.HedgingPolicyOrBuilder
The hedging policy for outgoing RPCs. Hedged RPCs may execute more than once on the server, so only idempotent methods should specify a hedging policy.
Protobuf typegrpc.service_config.MethodConfig.HedgingPolicy- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMethodConfig.HedgingPolicy.BuilderThe hedging policy for outgoing RPCs.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intHEDGING_DELAY_FIELD_NUMBERstatic intMAX_ATTEMPTS_FIELD_NUMBERstatic intNON_FATAL_STATUS_CODES_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static MethodConfig.HedgingPolicygetDefaultInstance()MethodConfig.HedgingPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.DurationgetHedgingDelay()The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay.com.google.protobuf.DurationOrBuildergetHedgingDelayOrBuilder()The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay.intgetMaxAttempts()The hedging policy will send up to max_requests RPCs.com.google.rpc.CodegetNonFatalStatusCodes(int index)The set of status codes which indicate other hedged RPCs may still succeed.intgetNonFatalStatusCodesCount()The set of status codes which indicate other hedged RPCs may still succeed.List<com.google.rpc.Code>getNonFatalStatusCodesList()The set of status codes which indicate other hedged RPCs may still succeed.intgetNonFatalStatusCodesValue(int index)The set of status codes which indicate other hedged RPCs may still succeed.List<Integer>getNonFatalStatusCodesValueList()The set of status codes which indicate other hedged RPCs may still succeed.com.google.protobuf.Parser<MethodConfig.HedgingPolicy>getParserForType()intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()inthashCode()booleanhasHedgingDelay()The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static MethodConfig.HedgingPolicy.BuildernewBuilder()static MethodConfig.HedgingPolicy.BuildernewBuilder(MethodConfig.HedgingPolicy prototype)MethodConfig.HedgingPolicy.BuildernewBuilderForType()protected MethodConfig.HedgingPolicy.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static MethodConfig.HedgingPolicyparseDelimitedFrom(InputStream input)static MethodConfig.HedgingPolicyparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MethodConfig.HedgingPolicyparseFrom(byte[] data)static MethodConfig.HedgingPolicyparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MethodConfig.HedgingPolicyparseFrom(com.google.protobuf.ByteString data)static MethodConfig.HedgingPolicyparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MethodConfig.HedgingPolicyparseFrom(com.google.protobuf.CodedInputStream input)static MethodConfig.HedgingPolicyparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MethodConfig.HedgingPolicyparseFrom(InputStream input)static MethodConfig.HedgingPolicyparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static MethodConfig.HedgingPolicyparseFrom(ByteBuffer data)static MethodConfig.HedgingPolicyparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<MethodConfig.HedgingPolicy>parser()MethodConfig.HedgingPolicy.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
MAX_ATTEMPTS_FIELD_NUMBER
public static final int MAX_ATTEMPTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
HEDGING_DELAY_FIELD_NUMBER
public static final int HEDGING_DELAY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NON_FATAL_STATUS_CODES_FIELD_NUMBER
public static final int NON_FATAL_STATUS_CODES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getMaxAttempts
public int getMaxAttempts()
The hedging policy will send up to max_requests RPCs. This number represents the total number of all attempts, including the original attempt. This field is required and must be greater than 1. Any value greater than 5 will be treated as if it were 5.
uint32 max_attempts = 1;- Specified by:
getMaxAttemptsin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- The maxAttempts.
-
hasHedgingDelay
public boolean hasHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;- Specified by:
hasHedgingDelayin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- Whether the hedgingDelay field is set.
-
getHedgingDelay
public com.google.protobuf.Duration getHedgingDelay()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;- Specified by:
getHedgingDelayin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- The hedgingDelay.
-
getHedgingDelayOrBuilder
public com.google.protobuf.DurationOrBuilder getHedgingDelayOrBuilder()
The first RPC will be sent immediately, but the max_requests-1 subsequent hedged RPCs will be sent at intervals of every hedging_delay. Set this to 0 to immediately send all max_requests RPCs.
.google.protobuf.Duration hedging_delay = 2;- Specified by:
getHedgingDelayOrBuilderin interfaceMethodConfig.HedgingPolicyOrBuilder
-
getNonFatalStatusCodesList
public List<com.google.rpc.Code> getNonFatalStatusCodesList()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;- Specified by:
getNonFatalStatusCodesListin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- A list containing the nonFatalStatusCodes.
-
getNonFatalStatusCodesCount
public int getNonFatalStatusCodesCount()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;- Specified by:
getNonFatalStatusCodesCountin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- The count of nonFatalStatusCodes.
-
getNonFatalStatusCodes
public com.google.rpc.Code getNonFatalStatusCodes(int index)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;- Specified by:
getNonFatalStatusCodesin interfaceMethodConfig.HedgingPolicyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The nonFatalStatusCodes at the given index.
-
getNonFatalStatusCodesValueList
public List<Integer> getNonFatalStatusCodesValueList()
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;- Specified by:
getNonFatalStatusCodesValueListin interfaceMethodConfig.HedgingPolicyOrBuilder- Returns:
- A list containing the enum numeric values on the wire for nonFatalStatusCodes.
-
getNonFatalStatusCodesValue
public int getNonFatalStatusCodesValue(int index)
The set of status codes which indicate other hedged RPCs may still succeed. If a non-fatal status code is returned by the server, hedged RPCs will continue. Otherwise, outstanding requests will be canceled and the error returned to the client application layer. This field is optional.
repeated .google.rpc.Code non_fatal_status_codes = 3;- Specified by:
getNonFatalStatusCodesValuein interfaceMethodConfig.HedgingPolicyOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The enum numeric value on the wire of nonFatalStatusCodes at the given index.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static MethodConfig.HedgingPolicy parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static MethodConfig.HedgingPolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static MethodConfig.HedgingPolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public MethodConfig.HedgingPolicy.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static MethodConfig.HedgingPolicy.Builder newBuilder()
-
newBuilder
public static MethodConfig.HedgingPolicy.Builder newBuilder(MethodConfig.HedgingPolicy prototype)
-
toBuilder
public MethodConfig.HedgingPolicy.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected MethodConfig.HedgingPolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static MethodConfig.HedgingPolicy getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<MethodConfig.HedgingPolicy> parser()
-
getParserForType
public com.google.protobuf.Parser<MethodConfig.HedgingPolicy> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public MethodConfig.HedgingPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-