Class MethodConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.grpc.serviceconfig.MethodConfig
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, MethodConfigOrBuilder, Serializable

public final class MethodConfig extends com.google.protobuf.GeneratedMessageV3 implements MethodConfigOrBuilder
 Configuration for a method.
 
Protobuf type grpc.service_config.MethodConfig
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • WAIT_FOR_READY_FIELD_NUMBER

      public static final int WAIT_FOR_READY_FIELD_NUMBER
      See Also:
    • TIMEOUT_FIELD_NUMBER

      public static final int TIMEOUT_FIELD_NUMBER
      See Also:
    • MAX_REQUEST_MESSAGE_BYTES_FIELD_NUMBER

      public static final int MAX_REQUEST_MESSAGE_BYTES_FIELD_NUMBER
      See Also:
    • MAX_RESPONSE_MESSAGE_BYTES_FIELD_NUMBER

      public static final int MAX_RESPONSE_MESSAGE_BYTES_FIELD_NUMBER
      See Also:
    • RETRY_POLICY_FIELD_NUMBER

      public static final int RETRY_POLICY_FIELD_NUMBER
      See Also:
    • HEDGING_POLICY_FIELD_NUMBER

      public static final int HEDGING_POLICY_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getRetryOrHedgingPolicyCase

      public MethodConfig.RetryOrHedgingPolicyCase getRetryOrHedgingPolicyCase()
      Specified by:
      getRetryOrHedgingPolicyCase in interface MethodConfigOrBuilder
    • getNameList

      public List<MethodConfig.Name> getNameList()
      repeated .grpc.service_config.MethodConfig.Name name = 1;
      Specified by:
      getNameList in interface MethodConfigOrBuilder
    • getNameOrBuilderList

      public List<? extends MethodConfig.NameOrBuilder> getNameOrBuilderList()
      repeated .grpc.service_config.MethodConfig.Name name = 1;
      Specified by:
      getNameOrBuilderList in interface MethodConfigOrBuilder
    • getNameCount

      public int getNameCount()
      repeated .grpc.service_config.MethodConfig.Name name = 1;
      Specified by:
      getNameCount in interface MethodConfigOrBuilder
    • getName

      public MethodConfig.Name getName(int index)
      repeated .grpc.service_config.MethodConfig.Name name = 1;
      Specified by:
      getName in interface MethodConfigOrBuilder
    • getNameOrBuilder

      public MethodConfig.NameOrBuilder getNameOrBuilder(int index)
      repeated .grpc.service_config.MethodConfig.Name name = 1;
      Specified by:
      getNameOrBuilder in interface MethodConfigOrBuilder
    • hasWaitForReady

      public boolean hasWaitForReady()
       Whether RPCs sent to this method should wait until the connection is
       ready by default. If false, the RPC will abort immediately if there is
       a transient failure connecting to the server. Otherwise, gRPC will
       attempt to connect until the deadline is exceeded.
      
       The value specified via the gRPC client API will override the value
       set here. However, note that setting the value in the client API will
       also affect transient errors encountered during name resolution, which
       cannot be caught by the value here, since the service config is
       obtained by the gRPC client via name resolution.
       
      .google.protobuf.BoolValue wait_for_ready = 2;
      Specified by:
      hasWaitForReady in interface MethodConfigOrBuilder
      Returns:
      Whether the waitForReady field is set.
    • getWaitForReady

      public com.google.protobuf.BoolValue getWaitForReady()
       Whether RPCs sent to this method should wait until the connection is
       ready by default. If false, the RPC will abort immediately if there is
       a transient failure connecting to the server. Otherwise, gRPC will
       attempt to connect until the deadline is exceeded.
      
       The value specified via the gRPC client API will override the value
       set here. However, note that setting the value in the client API will
       also affect transient errors encountered during name resolution, which
       cannot be caught by the value here, since the service config is
       obtained by the gRPC client via name resolution.
       
      .google.protobuf.BoolValue wait_for_ready = 2;
      Specified by:
      getWaitForReady in interface MethodConfigOrBuilder
      Returns:
      The waitForReady.
    • getWaitForReadyOrBuilder

      public com.google.protobuf.BoolValueOrBuilder getWaitForReadyOrBuilder()
       Whether RPCs sent to this method should wait until the connection is
       ready by default. If false, the RPC will abort immediately if there is
       a transient failure connecting to the server. Otherwise, gRPC will
       attempt to connect until the deadline is exceeded.
      
       The value specified via the gRPC client API will override the value
       set here. However, note that setting the value in the client API will
       also affect transient errors encountered during name resolution, which
       cannot be caught by the value here, since the service config is
       obtained by the gRPC client via name resolution.
       
      .google.protobuf.BoolValue wait_for_ready = 2;
      Specified by:
      getWaitForReadyOrBuilder in interface MethodConfigOrBuilder
    • hasTimeout

      public boolean hasTimeout()
       The default timeout in seconds for RPCs sent to this method. This can be
       overridden in code. If no reply is received in the specified amount of
       time, the request is aborted and a DEADLINE_EXCEEDED error status
       is returned to the caller.
      
       The actual deadline used will be the minimum of the value specified here
       and the value set by the application via the gRPC client API.  If either
       one is not set, then the other will be used.  If neither is set, then the
       request has no deadline.
       
      .google.protobuf.Duration timeout = 3;
      Specified by:
      hasTimeout in interface MethodConfigOrBuilder
      Returns:
      Whether the timeout field is set.
    • getTimeout

      public com.google.protobuf.Duration getTimeout()
       The default timeout in seconds for RPCs sent to this method. This can be
       overridden in code. If no reply is received in the specified amount of
       time, the request is aborted and a DEADLINE_EXCEEDED error status
       is returned to the caller.
      
       The actual deadline used will be the minimum of the value specified here
       and the value set by the application via the gRPC client API.  If either
       one is not set, then the other will be used.  If neither is set, then the
       request has no deadline.
       
      .google.protobuf.Duration timeout = 3;
      Specified by:
      getTimeout in interface MethodConfigOrBuilder
      Returns:
      The timeout.
    • getTimeoutOrBuilder

      public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
       The default timeout in seconds for RPCs sent to this method. This can be
       overridden in code. If no reply is received in the specified amount of
       time, the request is aborted and a DEADLINE_EXCEEDED error status
       is returned to the caller.
      
       The actual deadline used will be the minimum of the value specified here
       and the value set by the application via the gRPC client API.  If either
       one is not set, then the other will be used.  If neither is set, then the
       request has no deadline.
       
      .google.protobuf.Duration timeout = 3;
      Specified by:
      getTimeoutOrBuilder in interface MethodConfigOrBuilder
    • hasMaxRequestMessageBytes

      public boolean hasMaxRequestMessageBytes()
       The maximum allowed payload size for an individual request or object in a
       stream (client->server) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a client attempts to send an object larger than this value, it will not
       be sent and the client will see a ClientError.
       Note that 0 is a valid value, meaning that the request message
       must be empty.
       
      .google.protobuf.UInt32Value max_request_message_bytes = 4;
      Specified by:
      hasMaxRequestMessageBytes in interface MethodConfigOrBuilder
      Returns:
      Whether the maxRequestMessageBytes field is set.
    • getMaxRequestMessageBytes

      public com.google.protobuf.UInt32Value getMaxRequestMessageBytes()
       The maximum allowed payload size for an individual request or object in a
       stream (client->server) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a client attempts to send an object larger than this value, it will not
       be sent and the client will see a ClientError.
       Note that 0 is a valid value, meaning that the request message
       must be empty.
       
      .google.protobuf.UInt32Value max_request_message_bytes = 4;
      Specified by:
      getMaxRequestMessageBytes in interface MethodConfigOrBuilder
      Returns:
      The maxRequestMessageBytes.
    • getMaxRequestMessageBytesOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getMaxRequestMessageBytesOrBuilder()
       The maximum allowed payload size for an individual request or object in a
       stream (client->server) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a client attempts to send an object larger than this value, it will not
       be sent and the client will see a ClientError.
       Note that 0 is a valid value, meaning that the request message
       must be empty.
       
      .google.protobuf.UInt32Value max_request_message_bytes = 4;
      Specified by:
      getMaxRequestMessageBytesOrBuilder in interface MethodConfigOrBuilder
    • hasMaxResponseMessageBytes

      public boolean hasMaxResponseMessageBytes()
       The maximum allowed payload size for an individual response or object in a
       stream (server->client) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a server attempts to send an object larger than this value, it will not
       be sent, and a ServerError will be sent to the client instead.
       Note that 0 is a valid value, meaning that the response message
       must be empty.
       
      .google.protobuf.UInt32Value max_response_message_bytes = 5;
      Specified by:
      hasMaxResponseMessageBytes in interface MethodConfigOrBuilder
      Returns:
      Whether the maxResponseMessageBytes field is set.
    • getMaxResponseMessageBytes

      public com.google.protobuf.UInt32Value getMaxResponseMessageBytes()
       The maximum allowed payload size for an individual response or object in a
       stream (server->client) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a server attempts to send an object larger than this value, it will not
       be sent, and a ServerError will be sent to the client instead.
       Note that 0 is a valid value, meaning that the response message
       must be empty.
       
      .google.protobuf.UInt32Value max_response_message_bytes = 5;
      Specified by:
      getMaxResponseMessageBytes in interface MethodConfigOrBuilder
      Returns:
      The maxResponseMessageBytes.
    • getMaxResponseMessageBytesOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getMaxResponseMessageBytesOrBuilder()
       The maximum allowed payload size for an individual response or object in a
       stream (server->client) in bytes. The size which is measured is the
       serialized payload after per-message compression (but before stream
       compression) in bytes. This applies both to streaming and non-streaming
       requests.
      
       The actual value used is the minimum of the value specified here and the
       value set by the application via the gRPC client API.  If either one is
       not set, then the other will be used.  If neither is set, then the
       built-in default is used.
      
       If a server attempts to send an object larger than this value, it will not
       be sent, and a ServerError will be sent to the client instead.
       Note that 0 is a valid value, meaning that the response message
       must be empty.
       
      .google.protobuf.UInt32Value max_response_message_bytes = 5;
      Specified by:
      getMaxResponseMessageBytesOrBuilder in interface MethodConfigOrBuilder
    • hasRetryPolicy

      public boolean hasRetryPolicy()
      .grpc.service_config.MethodConfig.RetryPolicy retry_policy = 6;
      Specified by:
      hasRetryPolicy in interface MethodConfigOrBuilder
      Returns:
      Whether the retryPolicy field is set.
    • getRetryPolicy

      public MethodConfig.RetryPolicy getRetryPolicy()
      .grpc.service_config.MethodConfig.RetryPolicy retry_policy = 6;
      Specified by:
      getRetryPolicy in interface MethodConfigOrBuilder
      Returns:
      The retryPolicy.
    • getRetryPolicyOrBuilder

      public MethodConfig.RetryPolicyOrBuilder getRetryPolicyOrBuilder()
      .grpc.service_config.MethodConfig.RetryPolicy retry_policy = 6;
      Specified by:
      getRetryPolicyOrBuilder in interface MethodConfigOrBuilder
    • hasHedgingPolicy

      public boolean hasHedgingPolicy()
      .grpc.service_config.MethodConfig.HedgingPolicy hedging_policy = 7;
      Specified by:
      hasHedgingPolicy in interface MethodConfigOrBuilder
      Returns:
      Whether the hedgingPolicy field is set.
    • getHedgingPolicy

      public MethodConfig.HedgingPolicy getHedgingPolicy()
      .grpc.service_config.MethodConfig.HedgingPolicy hedging_policy = 7;
      Specified by:
      getHedgingPolicy in interface MethodConfigOrBuilder
      Returns:
      The hedgingPolicy.
    • getHedgingPolicyOrBuilder

      public MethodConfig.HedgingPolicyOrBuilder getHedgingPolicyOrBuilder()
      .grpc.service_config.MethodConfig.HedgingPolicy hedging_policy = 7;
      Specified by:
      getHedgingPolicyOrBuilder in interface MethodConfigOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static MethodConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MethodConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MethodConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MethodConfig 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 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MethodConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static MethodConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MethodConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MethodConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static MethodConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MethodConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static MethodConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public MethodConfig.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static MethodConfig.Builder newBuilder()
    • newBuilder

      public static MethodConfig.Builder newBuilder(MethodConfig prototype)
    • toBuilder

      public MethodConfig.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected MethodConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static MethodConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<MethodConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<MethodConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public MethodConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder