Package com.google.cloud.spanner
Class InstanceInfo.Builder
- java.lang.Object
-
- com.google.cloud.spanner.InstanceInfo.Builder
-
- Direct Known Subclasses:
Instance.Builder
- Enclosing class:
- InstanceInfo
public abstract static class InstanceInfo.Builder extends Object
Builder forInstanceInfo.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract InstanceInfo.BuilderaddLabel(String key, String value)abstract InstanceInfobuild()abstract InstanceInfo.BuilderputAllLabels(Map<String,String> labels)abstract InstanceInfo.BuildersetDisplayName(String displayName)abstract InstanceInfo.BuildersetInstanceConfigId(InstanceConfigId configId)abstract InstanceInfo.BuildersetNodeCount(int nodeCount)Sets the number of nodes for the instance.InstanceInfo.BuildersetProcessingUnits(int processingUnits)Sets the number of processing units for the instance.abstract InstanceInfo.BuildersetState(InstanceInfo.State state)
-
-
-
Method Detail
-
setInstanceConfigId
public abstract InstanceInfo.Builder setInstanceConfigId(InstanceConfigId configId)
-
setDisplayName
public abstract InstanceInfo.Builder setDisplayName(String displayName)
-
setNodeCount
public abstract InstanceInfo.Builder setNodeCount(int nodeCount)
Sets the number of nodes for the instance. Exactly one of processing units or node count must be set when creating a new instance.
-
setProcessingUnits
public InstanceInfo.Builder setProcessingUnits(int processingUnits)
Sets the number of processing units for the instance. Exactly one of processing units or node count must be set when creating a new instance. Processing units must be between 1 and 999 (inclusive) when creating a new instance with node count = 0. Processing units from 1000 and up must always be a multiple of 1000 (that is equal to an integer number of nodes).
-
setState
public abstract InstanceInfo.Builder setState(InstanceInfo.State state)
-
addLabel
public abstract InstanceInfo.Builder addLabel(String key, String value)
-
putAllLabels
public abstract InstanceInfo.Builder putAllLabels(Map<String,String> labels)
-
build
public abstract InstanceInfo build()
-
-