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 for InstanceInfo.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • 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()