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.Builder
addLabel(String key, String value)
abstract InstanceInfo
build()
abstract InstanceInfo.Builder
putAllLabels(Map<String,String> labels)
abstract InstanceInfo.Builder
setDisplayName(String displayName)
abstract InstanceInfo.Builder
setInstanceConfigId(InstanceConfigId configId)
abstract InstanceInfo.Builder
setNodeCount(int nodeCount)
Sets the number of nodes for the instance.InstanceInfo.Builder
setProcessingUnits(int processingUnits)
Sets the number of processing units for the instance.abstract InstanceInfo.Builder
setState(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()
-
-