Class TrafficSplit (2.42.0)

public final class TrafficSplit extends GeneratedMessageV3 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 Fields

ALLOCATIONS_FIELD_NUMBER

public static final int ALLOCATIONS_FIELD_NUMBER
Field Value
Type Description
int

SHARD_BY_FIELD_NUMBER

public static final int SHARD_BY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static TrafficSplit getDefaultInstance()
Returns
Type Description
TrafficSplit

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static TrafficSplit.Builder newBuilder()
Returns
Type Description
TrafficSplit.Builder

newBuilder(TrafficSplit prototype)

public static TrafficSplit.Builder newBuilder(TrafficSplit prototype)
Parameter
Name Description
prototype TrafficSplit
Returns
Type Description
TrafficSplit.Builder

parseDelimitedFrom(InputStream input)

public static TrafficSplit parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static TrafficSplit parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TrafficSplit parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TrafficSplit parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static TrafficSplit parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static TrafficSplit parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<TrafficSplit> parser()
Returns
Type Description
Parser<TrafficSplit>

Methods

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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllocations() (deprecated)

public Map<String,Double> getAllocations()

Use #getAllocationsMap() instead.

Returns
Type Description
Map<String,java.lang.Double>

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
Type Description
int

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
Type Description
Map<String,java.lang.Double>

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
Name Description
key String
defaultValue double
Returns
Type Description
double

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
Name Description
key String
Returns
Type Description
double

getDefaultInstanceForType()

public TrafficSplit getDefaultInstanceForType()
Returns
Type Description
TrafficSplit

getParserForType()

public Parser<TrafficSplit> getParserForType()
Returns
Type Description
Parser<TrafficSplit>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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
Type Description
TrafficSplit.ShardBy

The shardBy.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
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()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public TrafficSplit.Builder newBuilderForType()
Returns
Type Description
TrafficSplit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TrafficSplit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TrafficSplit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public TrafficSplit.Builder toBuilder()
Returns
Type Description
TrafficSplit.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException