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:
setInstanceConfigId
in classInstanceInfo.Builder
-
setDisplayName
- Specified by:
setDisplayName
in classInstanceInfo.Builder
-
setNodeCount
Description copied from class:InstanceInfo.Builder
Sets 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:
setNodeCount
in classInstanceInfo.Builder
-
setProcessingUnits
Description copied from class:InstanceInfo.Builder
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).- Overrides:
setProcessingUnits
in classInstanceInfo.Builder
-
setState
- Specified by:
setState
in classInstanceInfo.Builder
-
addLabel
- Specified by:
addLabel
in classInstanceInfo.Builder
-
putAllLabels
- Specified by:
putAllLabels
in classInstanceInfo.Builder
-
build
- Specified by:
build
in classInstanceInfo.Builder
-