Class TrafficSplit (2.37.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
TypeDescription
int

SHARD_BY_FIELD_NUMBER

public static final int SHARD_BY_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TrafficSplit getDefaultInstance()
Returns
TypeDescription
TrafficSplit

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static TrafficSplit.Builder newBuilder()
Returns
TypeDescription
TrafficSplit.Builder

newBuilder(TrafficSplit prototype)

public static TrafficSplit.Builder newBuilder(TrafficSplit prototype)
Parameter
NameDescription
prototypeTrafficSplit
Returns
TypeDescription
TrafficSplit.Builder

parseDelimitedFrom(InputStream input)

public static TrafficSplit parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TrafficSplit parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TrafficSplit parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TrafficSplit parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TrafficSplit parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TrafficSplit parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TrafficSplit parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TrafficSplit
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TrafficSplit> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAllocations() (deprecated)

public Map<String,Double> getAllocations()

Use #getAllocationsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValuedouble
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
double

getDefaultInstanceForType()

public TrafficSplit getDefaultInstanceForType()
Returns
TypeDescription
TrafficSplit

getParserForType()

public Parser<TrafficSplit> getParserForType()
Returns
TypeDescription
Parser<TrafficSplit>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
int

The enum numeric value on the wire for shardBy.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TrafficSplit.Builder newBuilderForType()
Returns
TypeDescription
TrafficSplit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TrafficSplit.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TrafficSplit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TrafficSplit.Builder toBuilder()
Returns
TypeDescription
TrafficSplit.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException