Package com.google.cloud.spanner
Class Instance.Builder
java.lang.Object
com.google.cloud.spanner.InstanceInfo.Builder
com.google.cloud.spanner.Instance.Builder
- Enclosing class:
- Instance
Builder of
Instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()putAllLabels(Map<String, String> labels) setDisplayName(String displayName) setInstanceConfigId(InstanceConfigId instanceConfigId) setNodeCount(int nodeCount) Sets the number of nodes for the instance.setProcessingUnits(int processingUnits) Sets the number of processing units for the instance.setState(InstanceInfo.State state)
-
Method Details
-
setInstanceConfigId
- Specified by:
setInstanceConfigIdin classInstanceInfo.Builder
-
setDisplayName
- Specified by:
setDisplayNamein classInstanceInfo.Builder
-
setNodeCount
Description copied from class:InstanceInfo.BuilderSets the number of nodes for the instance. Exactly one of processing units or node count must be set when creating a new instance.- Specified by:
setNodeCountin classInstanceInfo.Builder
-
setProcessingUnits
Description copied from class:InstanceInfo.BuilderSets 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).- Overrides:
setProcessingUnitsin classInstanceInfo.Builder
-
setState
- Specified by:
setStatein classInstanceInfo.Builder
-
addLabel
- Specified by:
addLabelin classInstanceInfo.Builder
-
putAllLabels
- Specified by:
putAllLabelsin classInstanceInfo.Builder
-
build
- Specified by:
buildin classInstanceInfo.Builder
-