Enum Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy

    • Enum Constant Detail

      • FALLBACK_LIST

        public static final Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy FALLBACK_LIST
         A special metadata key ``fallback_list`` will be used to provide variants of metadata to try.
         Value of ``fallback_list`` key has to be a list. Every list element has to be a struct - it will
         be merged with route metadata, overriding keys that appear in both places.
         ``fallback_list`` entries will be used in order until a host is found.
        
         ``fallback_list`` key itself is removed from metadata before subset load balancing is performed.
        
         Example:
        
         for metadata:
        
         .. code-block:: yaml
        
         version: 1.0
         fallback_list:
         - version: 2.0
         hardware: c64
         - hardware: c32
         - version: 3.0
        
         at first, metadata:
        
         .. code-block:: json
        
         {"version": "2.0", "hardware": "c64"}
        
         will be used for load balancing. If no host is found, metadata:
        
         .. code-block:: json
        
         {"version": "1.0", "hardware": "c32"}
        
         is next to try. If it still results in no host, finally metadata:
        
         .. code-block:: json
        
         {"version": "3.0"}
        
         is used.
         
        FALLBACK_LIST = 1;
    • Field Detail

      • METADATA_NO_FALLBACK_VALUE

        public static final int METADATA_NO_FALLBACK_VALUE
         No fallback. Route metadata will be used as-is.
         
        METADATA_NO_FALLBACK = 0;
        See Also:
        Constant Field Values
      • FALLBACK_LIST_VALUE

        public static final int FALLBACK_LIST_VALUE
         A special metadata key ``fallback_list`` will be used to provide variants of metadata to try.
         Value of ``fallback_list`` key has to be a list. Every list element has to be a struct - it will
         be merged with route metadata, overriding keys that appear in both places.
         ``fallback_list`` entries will be used in order until a host is found.
        
         ``fallback_list`` key itself is removed from metadata before subset load balancing is performed.
        
         Example:
        
         for metadata:
        
         .. code-block:: yaml
        
         version: 1.0
         fallback_list:
         - version: 2.0
         hardware: c64
         - hardware: c32
         - version: 3.0
        
         at first, metadata:
        
         .. code-block:: json
        
         {"version": "2.0", "hardware": "c64"}
        
         will be used for load balancing. If no host is found, metadata:
        
         .. code-block:: json
        
         {"version": "1.0", "hardware": "c32"}
        
         is next to try. If it still results in no host, finally metadata:
        
         .. code-block:: json
        
         {"version": "3.0"}
        
         is used.
         
        FALLBACK_LIST = 1;
        See Also:
        Constant Field Values
      • value

        private final int value
    • Constructor Detail

      • LbSubsetMetadataFallbackPolicy

        private LbSubsetMetadataFallbackPolicy​(int value)
    • Method Detail

      • values

        public static Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy c : Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy valueOf​(int value)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static Cluster.LbSubsetConfig.LbSubsetMetadataFallbackPolicy valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        desc - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null