Class InstanceConfig.Builder (6.50.1)

public static class InstanceConfig.Builder extends InstanceConfigInfo.BuilderImpl

Builder of InstanceConfig.

Inheritance

java.lang.Object > InstanceConfigInfo.Builder > com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl > InstanceConfig.Builder

Methods

addLabel(String key, String value)

public InstanceConfig.Builder addLabel(String key, String value)
Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.addLabel(java.lang.String,java.lang.String)

addReadOnlyReplicas(List<ReplicaInfo> readOnlyReplicas)

public InstanceConfig.Builder addReadOnlyReplicas(List<ReplicaInfo> readOnlyReplicas)

Adds the read only replicas to the set of replicas for a custom instance config. Called with one or more of the optional replicas of the base config.

Parameter
NameDescription
readOnlyReplicasList<ReplicaInfo>
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.addReadOnlyReplicas(java.util.List<com.google.cloud.spanner.ReplicaInfo>)

build()

public InstanceConfig build()
Returns
TypeDescription
InstanceConfig
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.build()

putAllLabels(Map<String,String> labels)

public InstanceConfig.Builder putAllLabels(Map<String,String> labels)
Parameter
NameDescription
labelsMap<String,String>
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.putAllLabels(java.util.Map<java.lang.String,java.lang.String>)

setBaseConfig(InstanceConfigInfo baseConfig)

protected InstanceConfig.Builder setBaseConfig(InstanceConfigInfo baseConfig)
Parameter
NameDescription
baseConfigInstanceConfigInfo
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setBaseConfig(com.google.cloud.spanner.InstanceConfigInfo)

setConfigType(InstanceConfigInfo.Type configType)

protected InstanceConfig.Builder setConfigType(InstanceConfigInfo.Type configType)
Parameter
NameDescription
configTypeInstanceConfigInfo.Type
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setConfigType(com.google.cloud.spanner.InstanceConfigInfo.Type)

setDisplayName(String displayName)

public InstanceConfig.Builder setDisplayName(String displayName)
Parameter
NameDescription
displayNameString
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setDisplayName(java.lang.String)

setEtag(String etag)

public InstanceConfig.Builder setEtag(String etag)
Parameter
NameDescription
etagString
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setEtag(java.lang.String)

setLeaderOptions(List<String> leaderOptions)

public InstanceConfig.Builder setLeaderOptions(List<String> leaderOptions)

Sets the allowed values of the "default_leader" schema option for databases in instances that use this instance configuration.

Parameter
NameDescription
leaderOptionsList<String>
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setLeaderOptions(java.util.List<java.lang.String>)

setOptionalReplicas(List<ReplicaInfo> optionalReplicas)

protected InstanceConfig.Builder setOptionalReplicas(List<ReplicaInfo> optionalReplicas)
Parameter
NameDescription
optionalReplicasList<ReplicaInfo>
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setOptionalReplicas(java.util.List<com.google.cloud.spanner.ReplicaInfo>)

setReconciling(boolean reconciling)

protected InstanceConfig.Builder setReconciling(boolean reconciling)
Parameter
NameDescription
reconcilingboolean
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setReconciling(boolean)

setReplicas(List<ReplicaInfo> replicas)

protected InstanceConfig.Builder setReplicas(List<ReplicaInfo> replicas)
Parameter
NameDescription
replicasList<ReplicaInfo>
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setReplicas(java.util.List<com.google.cloud.spanner.ReplicaInfo>)

setState(InstanceConfigInfo.State state)

protected InstanceConfig.Builder setState(InstanceConfigInfo.State state)
Parameter
NameDescription
stateInstanceConfigInfo.State
Returns
TypeDescription
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setState(com.google.cloud.spanner.InstanceConfigInfo.State)