Class TrafficSplit (2.39.0)

publicfinalclass TrafficSplitextendsGeneratedMessageV3implementsTrafficSplitOrBuilder

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

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

ALLOCATIONS_FIELD_NUMBER

publicstaticfinalintALLOCATIONS_FIELD_NUMBER
Field Value
Type Description
int

SHARD_BY_FIELD_NUMBER

publicstaticfinalintSHARD_BY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticTrafficSplitgetDefaultInstance()
Returns
Type Description
TrafficSplit

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticTrafficSplit.BuildernewBuilder()
Returns
Type Description
TrafficSplit.Builder

newBuilder(TrafficSplit prototype)

publicstaticTrafficSplit.BuildernewBuilder(TrafficSplitprototype)
Parameter
Name Description
prototype TrafficSplit
Returns
Type Description
TrafficSplit.Builder

parseDelimitedFrom(InputStream input)

publicstaticTrafficSplitparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticTrafficSplitparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticTrafficSplitparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticTrafficSplitparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticTrafficSplitparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticTrafficSplitparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticTrafficSplitparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TrafficSplit
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<TrafficSplit>parser()
Returns
Type Description
Parser<TrafficSplit>

Methods

containsAllocations(String key)

publicbooleancontainsAllocations(Stringkey)

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)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAllocations() (deprecated)

publicMap<String,Double>getAllocations()

Use #getAllocationsMap() instead.

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

getAllocationsCount()

publicintgetAllocationsCount()

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()

publicMap<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)

publicdoublegetAllocationsOrDefault(Stringkey,doubledefaultValue)

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)

publicdoublegetAllocationsOrThrow(Stringkey)

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()

publicTrafficSplitgetDefaultInstanceForType()
Returns
Type Description
TrafficSplit

getParserForType()

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

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getShardBy()

publicTrafficSplit.ShardBygetShardBy()

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()

publicintgetShardByValue()

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()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicTrafficSplit.BuildernewBuilderForType()
Returns
Type Description
TrafficSplit.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedTrafficSplit.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TrafficSplit.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicTrafficSplit.BuildertoBuilder()
Returns
Type Description
TrafficSplit.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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年10月30日 UTC.