public static final class TrafficSplit.Builder extends GeneratedMessageV3.Builder<TrafficSplit.Builder> implements TrafficSplitOrBuilder
Traffic routing configuration for versions within a single service. Traffic
splits define how traffic directed to the service is assigned to versions.
Protobuf type google.appengine.v1.TrafficSplit
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TrafficSplit.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public TrafficSplit build()
Returns
buildPartial()
public TrafficSplit buildPartial()
Returns
clear()
public TrafficSplit.Builder clear()
Returns
Overrides
clearAllocations()
public TrafficSplit.Builder clearAllocations()
Returns
clearField(Descriptors.FieldDescriptor field)
public TrafficSplit.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public TrafficSplit.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearShardBy()
public TrafficSplit.Builder clearShardBy()
Mechanism used to determine which version a request is sent to.
The traffic selection algorithm will
be stable for either type until allocations are changed.
.google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
Returns
clone()
public TrafficSplit.Builder clone()
Returns
Overrides
containsAllocations(String key)
public boolean containsAllocations(String key)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameter
Returns
getAllocations()
public Map<String,Double> getAllocations()
Returns
getAllocationsCount()
public int getAllocationsCount()
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Returns
getAllocationsMap()
public Map<String,Double> getAllocationsMap()
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Returns
getAllocationsOrDefault(String key, double defaultValue)
public double getAllocationsOrDefault(String key, double defaultValue)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameters
Returns
getAllocationsOrThrow(String key)
public double getAllocationsOrThrow(String key)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameter
Returns
getDefaultInstanceForType()
public TrafficSplit getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMutableAllocations()
public Map<String,Double> getMutableAllocations()
Use alternate mutation accessors instead.
Returns
getShardBy()
public TrafficSplit.ShardBy getShardBy()
Mechanism used to determine which version a request is sent to.
The traffic selection algorithm will
be stable for either type until allocations are changed.
.google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
Returns
getShardByValue()
public int getShardByValue()
Mechanism used to determine which version a request is sent to.
The traffic selection algorithm will
be stable for either type until allocations are changed.
.google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
Returns
Type | Description |
int | The enum numeric value on the wire for shardBy.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(TrafficSplit other)
public TrafficSplit.Builder mergeFrom(TrafficSplit other)
Parameter
Returns
public TrafficSplit.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public TrafficSplit.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TrafficSplit.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllAllocations(Map<String,Double> values)
public TrafficSplit.Builder putAllAllocations(Map<String,Double> values)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameter
Name | Description |
values | Map<String,java.lang.Double>
|
Returns
putAllocations(String key, double value)
public TrafficSplit.Builder putAllocations(String key, double value)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameters
Returns
removeAllocations(String key)
public TrafficSplit.Builder removeAllocations(String key)
Mapping from version IDs within the service to fractional
(0.000, 1] allocations of traffic for that version. Each version can
be specified only once, but some versions in the service may not
have any traffic allocation. Services that have traffic allocated
cannot be deleted until either the service is deleted or
their traffic allocation is removed. Allocations must sum to 1.
Up to two decimal place precision is supported for IP-based splits and
up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public TrafficSplit.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TrafficSplit.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setShardBy(TrafficSplit.ShardBy value)
public TrafficSplit.Builder setShardBy(TrafficSplit.ShardBy value)
Mechanism used to determine which version a request is sent to.
The traffic selection algorithm will
be stable for either type until allocations are changed.
.google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
Parameter
Returns
setShardByValue(int value)
public TrafficSplit.Builder setShardByValue(int value)
Mechanism used to determine which version a request is sent to.
The traffic selection algorithm will
be stable for either type until allocations are changed.
.google.appengine.v1.TrafficSplit.ShardBy shard_by = 1;
Parameter
Name | Description |
value | int
The enum numeric value on the wire for shardBy to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final TrafficSplit.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides