Send feedback
Class Rollout.TrafficPercentStrategy (3.35.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.35.0 keyboard_arrow_down
public static final class Rollout . TrafficPercentStrategy extends GeneratedMessageV3 implements Rollout . TrafficPercentStrategyOrBuilder
Strategy that specifies how clients of Google Service Controller want to
send traffic to use different config versions. This is generally
used by API proxy to split traffic based on your configured percentage for
each config version.
One example of how to gradually rollout a new service configuration using
this
strategy:
Day 1
Rollout {
id: "example.googleapis.com/rollout_20160206"
traffic_percent_strategy {
percentages: {
"example.googleapis.com/20160201": 70.00
"example.googleapis.com/20160206": 30.00
}
}
}
Day 2
Rollout {
id: "example.googleapis.com/rollout_20160207"
traffic_percent_strategy: {
percentages: {
"example.googleapis.com/20160206": 100.00
}
}
}
Protobuf type google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
PERCENTAGES_FIELD_NUMBER
public static final int PERCENTAGES_FIELD_NUMBER
Field Value Type Description int
Static Methods
getDefaultInstance()
public static Rollout . TrafficPercentStrategy getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static Rollout . TrafficPercentStrategy . Builder newBuilder ()
newBuilder(Rollout.TrafficPercentStrategy prototype)
public static Rollout . TrafficPercentStrategy . Builder newBuilder ( Rollout . TrafficPercentStrategy prototype )
public static Rollout . TrafficPercentStrategy parseDelimitedFrom ( InputStream input )
public static Rollout . TrafficPercentStrategy parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static Rollout . TrafficPercentStrategy parseFrom ( byte [] data )
Parameter Name Description data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Rollout . TrafficPercentStrategy parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static Rollout . TrafficPercentStrategy parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Rollout . TrafficPercentStrategy parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static Rollout . TrafficPercentStrategy parseFrom ( CodedInputStream input )
public static Rollout . TrafficPercentStrategy parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static Rollout . TrafficPercentStrategy parseFrom ( InputStream input )
public static Rollout . TrafficPercentStrategy parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static Rollout . TrafficPercentStrategy parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Rollout . TrafficPercentStrategy parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<Rollout . TrafficPercentStrategy > parser ()
Methods
containsPercentages(String key)
public boolean containsPercentages ( String key )
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter Name Description key
String
equals(Object obj)
public boolean equals ( Object obj )
Parameter Name Description obj
Object
Overrides
getDefaultInstanceForType()
public Rollout . TrafficPercentStrategy getDefaultInstanceForType ()
getParserForType()
public Parser<Rollout . TrafficPercentStrategy > getParserForType ()
Overrides
getPercentages() (deprecated)
public Map<String , Double > getPercentages ()
Returns Type Description Map <String ,java.lang.Double >
getPercentagesCount()
public int getPercentagesCount ()
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Returns Type Description int
getPercentagesMap()
public Map<String , Double > getPercentagesMap ()
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Returns Type Description Map <String ,java.lang.Double >
getPercentagesOrDefault(String key, double defaultValue)
public double getPercentagesOrDefault ( String key , double defaultValue )
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
getPercentagesOrThrow(String key)
public double getPercentagesOrThrow ( String key )
Maps service configuration IDs to their corresponding traffic percentage.
Key is the service configuration ID, Value is the traffic percentage
which must be greater than 0.0 and the sum must equal to 100.0.
map<string, double> percentages = 1;
Parameter Name Description key
String
getSerializedSize()
public int getSerializedSize ()
Returns Type Description int
Overrides
hashCode()
Returns Type Description int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection ( int number )
Parameter Name Description number
int
Returns Type Description com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public Rollout . TrafficPercentStrategy . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Rollout . TrafficPercentStrategy . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
toBuilder()
public Rollout . TrafficPercentStrategy . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
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-01-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-28 UTC."],[],[]]