Class InstanceConfig.Builder (6.80.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
Name Description
key String
value String
Returns
Type Description
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
Name Description
readOnlyReplicas List<ReplicaInfo>
Returns
Type Description
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.addReadOnlyReplicas(java.util.List<com.google.cloud.spanner.ReplicaInfo>)

build()

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

putAllLabels(Map<String,String> labels)

public InstanceConfig.Builder putAllLabels(Map<String,String> labels)
Parameter
Name Description
labels Map<String,String>
Returns
Type Description
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
Name Description
baseConfig InstanceConfigInfo
Returns
Type Description
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
Name Description
configType InstanceConfigInfo.Type
Returns
Type Description
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
Name Description
displayName String
Returns
Type Description
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setDisplayName(java.lang.String)

setEtag(String etag)

public InstanceConfig.Builder setEtag(String etag)
Parameter
Name Description
etag String
Returns
Type Description
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
Name Description
leaderOptions List<String>
Returns
Type Description
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
Name Description
optionalReplicas List<ReplicaInfo>
Returns
Type Description
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
Name Description
reconciling boolean
Returns
Type Description
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setReconciling(boolean)

setReplicas(List<ReplicaInfo> replicas)

protected InstanceConfig.Builder setReplicas(List<ReplicaInfo> replicas)
Parameter
Name Description
replicas List<ReplicaInfo>
Returns
Type Description
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
Name Description
state InstanceConfigInfo.State
Returns
Type Description
InstanceConfig.Builder
Overrides
com.google.cloud.spanner.InstanceConfigInfo.BuilderImpl.setState(com.google.cloud.spanner.InstanceConfigInfo.State)