Class UdpProxyConfig.HashPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
io.envoyproxy.envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, UdpProxyConfig.HashPolicyOrBuilder, Cloneable
Enclosing class:
UdpProxyConfig.HashPolicy

public static final class UdpProxyConfig.HashPolicy.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder> implements UdpProxyConfig.HashPolicyOrBuilder
 Specifies the UDP hash policy.
 The packets can be routed by hash policy.
 
Protobuf type envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig.HashPolicy
  • Method Details

    • 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.Builder<UdpProxyConfig.HashPolicy.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • getDefaultInstanceForType

      public UdpProxyConfig.HashPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public UdpProxyConfig.HashPolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public UdpProxyConfig.HashPolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • setField

      public UdpProxyConfig.HashPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • clearField

      public UdpProxyConfig.HashPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • clearOneof

      public UdpProxyConfig.HashPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • setRepeatedField

      public UdpProxyConfig.HashPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • addRepeatedField

      public UdpProxyConfig.HashPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • mergeFrom

      public UdpProxyConfig.HashPolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UdpProxyConfig.HashPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • mergeFrom

      public UdpProxyConfig.HashPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<UdpProxyConfig.HashPolicy.Builder>
      Throws:
      IOException
    • getPolicySpecifierCase

      public UdpProxyConfig.HashPolicy.PolicySpecifierCase getPolicySpecifierCase()
      Specified by:
      getPolicySpecifierCase in interface UdpProxyConfig.HashPolicyOrBuilder
    • clearPolicySpecifier

      public UdpProxyConfig.HashPolicy.Builder clearPolicySpecifier()
    • hasSourceIp

      public boolean hasSourceIp()
       The source IP will be used to compute the hash used by hash-based load balancing algorithms.
       
      bool source_ip = 1 [(.validate.rules) = { ... }
      Specified by:
      hasSourceIp in interface UdpProxyConfig.HashPolicyOrBuilder
      Returns:
      Whether the sourceIp field is set.
    • getSourceIp

      public boolean getSourceIp()
       The source IP will be used to compute the hash used by hash-based load balancing algorithms.
       
      bool source_ip = 1 [(.validate.rules) = { ... }
      Specified by:
      getSourceIp in interface UdpProxyConfig.HashPolicyOrBuilder
      Returns:
      The sourceIp.
    • setSourceIp

      public UdpProxyConfig.HashPolicy.Builder setSourceIp(boolean value)
       The source IP will be used to compute the hash used by hash-based load balancing algorithms.
       
      bool source_ip = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The sourceIp to set.
      Returns:
      This builder for chaining.
    • clearSourceIp

      public UdpProxyConfig.HashPolicy.Builder clearSourceIp()
       The source IP will be used to compute the hash used by hash-based load balancing algorithms.
       
      bool source_ip = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • hasKey

      public boolean hasKey()
       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Specified by:
      hasKey in interface UdpProxyConfig.HashPolicyOrBuilder
      Returns:
      Whether the key field is set.
    • getKey

      public String getKey()
       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Specified by:
      getKey in interface UdpProxyConfig.HashPolicyOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Specified by:
      getKeyBytes in interface UdpProxyConfig.HashPolicyOrBuilder
      Returns:
      The bytes for key.
    • setKey

       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setKeyBytes

      public UdpProxyConfig.HashPolicy.Builder setKeyBytes(com.google.protobuf.ByteString value)
       A given key will be used to compute the hash used by hash-based load balancing algorithms.
       In certain cases there is a need to direct different UDP streams jointly towards the selected set of endpoints.
       A possible use-case is VoIP telephony, where media (RTP) and its corresponding control (RTCP) belong to the same logical session,
       although they travel in separate streams. To ensure that these pair of streams are load-balanced on session level
       (instead of individual stream level), dynamically created listeners can use the same hash key for each stream in the session.
       
      string key = 2 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final UdpProxyConfig.HashPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>
    • mergeUnknownFields

      public final UdpProxyConfig.HashPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UdpProxyConfig.HashPolicy.Builder>