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) setAutoscalingConfig(AutoscalingConfig autoscalingConfig) Sets the autoscaling config for the instance, which will enable the autoscaling for this instance.setDisplayName(String displayName) setEdition(Instance.Edition edition) 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, node count or autoscaling config 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, node count, or autoscaling config 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
-
setAutoscalingConfig
Description copied from class:InstanceInfo.BuilderSets the autoscaling config for the instance, which will enable the autoscaling for this instance. Exactly one of processing units, node count, or autoscaling config must be set when creating a new instance.- Overrides:
setAutoscalingConfigin classInstanceInfo.Builder
-
setState
- Specified by:
setStatein classInstanceInfo.Builder
-
addLabel
- Specified by:
addLabelin classInstanceInfo.Builder
-
putAllLabels
- Specified by:
putAllLabelsin classInstanceInfo.Builder
-
setEdition
- Overrides:
setEditionin classInstanceInfo.Builder
-
build
- Specified by:
buildin classInstanceInfo.Builder
-