Class ZoneDefinition

java.lang.Object
org.apache.ignite.catalog.definitions.ZoneDefinition

public class ZoneDefinition extends Object
Definition of the CREATE ZONE statement.

The zone name is an SQL identifier expression, read exactly the way CREATE ZONE reads it: an unquoted name is folded to upper case, so builder("myZone") and builder("MYZONE") name the same zone; a double-quoted name is taken literally, so builder("\"myZone\"") names a case-sensitive zone. A name that is not a valid SQL identifier is rejected.

The built-in default zone is stored mixed-case, as Default, so naming it takes quotes as well: "\"Default\"", the value of Table.DEFAULT_ZONE. An unquoted Default names the zone DEFAULT instead.

  • Method Details

    • builder

      public static ZoneDefinition.Builder builder(String zoneName)
      Creates a builder for the zone with the specified name.
      Parameters:
      zoneName - Zone name as an SQL identifier expression.
      Returns:
      Builder.
      Throws:
      NullPointerException - If the name is null.
      IllegalArgumentException - If the name is blank or is not a valid SQL identifier.
    • zoneName

      public String zoneName()
      Returns zone name as an SQL identifier expression, quoted if the normalized name needs quoting to be spelled that way. E.g. MYZONE for a zone built from "myZone", and "myZone" for one built from "\"myZone\"".
      Returns:
      Zone name.
    • ifNotExists

      public boolean ifNotExists()
      Returns not exists flag.
      Returns:
      true if IF NOT EXISTS clause should be added to the statement.
    • partitions

      public Integer partitions()
      Returns number of partitions.
      Returns:
      Number of partitions.
    • replicas

      public Integer replicas()
      Returns number of replicas.
      Returns:
      Number of replicas.
    • quorumSize

      public Integer quorumSize()
      Returns quorum size.
      Returns:
      Quorum size.
    • distributionAlgorithm

      public String distributionAlgorithm()
      Returns distribution algorithm.
      Returns:
      Distribution algorithm.
    • dataNodesAutoAdjust

      @Deprecated public Integer dataNodesAutoAdjust()
      Deprecated.
      Deprecated, should not be used anymore. Returns timeout in seconds between node added or node left topology event itself and data nodes switch.
      Returns:
      Timeout.
    • dataNodesAutoAdjustScaleUp

      public Integer dataNodesAutoAdjustScaleUp()
      Returns timeout in seconds between node added topology event itself and data nodes switch.
      Returns:
      Timeout.
    • dataNodesAutoAdjustScaleDown

      public Integer dataNodesAutoAdjustScaleDown()
      Returns timeout in seconds between node left topology event itself and data nodes switch.
      Returns:
      Timeout.
    • filter

      public String filter()
      Returns nodes filter.
      Returns:
      Nodes filter.
    • storageProfiles

      public String storageProfiles()
      Returns storage profiles.
      Returns:
      Storage profiles.
    • consistencyMode

      public String consistencyMode()
      Returns consistency mode.
      Returns:
      Consistency mode.
    • toBuilder

      public ZoneDefinition.Builder toBuilder()
      Returns new builder using this definition.
      Returns:
      New builder.
    • toString

      public String toString()
      Overrides:
      toString in class Object