Class MachineProperties.Jdbc

java.lang.Object
me.ahoo.cosid.spring.boot.starter.machine.MachineProperties.Jdbc
Enclosing class:
MachineProperties

public static class MachineProperties.Jdbc extends Object
Configuration for JDBC-based machine ID distribution.

This configuration controls the automatic initialization of the cosid_machine table (and its indexes) at startup, and allows overriding the default DDL statements used by JdbcMachineIdInitializer.

  • Constructor Details

    • Jdbc

      public Jdbc()
  • Method Details

    • isEnableAutoInitCosidMachineTable

      public boolean isEnableAutoInitCosidMachineTable()
      Checks whether automatic cosid_machine table initialization is enabled.
      Returns:
      true if auto-init is enabled, false otherwise
    • setEnableAutoInitCosidMachineTable

      public void setEnableAutoInitCosidMachineTable(boolean enableAutoInitCosidMachineTable)
      Sets whether automatic cosid_machine table initialization is enabled.
      Parameters:
      enableAutoInitCosidMachineTable - true to enable auto-init, false otherwise
    • getInitCosIdMachineTableSql

      public String getInitCosIdMachineTableSql()
      Gets the DDL for creating the cosid_machine table.
      Returns:
      the table creation DDL
    • setInitCosIdMachineTableSql

      public void setInitCosIdMachineTableSql(String initCosIdMachineTableSql)
      Sets the DDL for creating the cosid_machine table.
      Parameters:
      initCosIdMachineTableSql - the table creation DDL to set
    • getInitNamespaceIdxSql

      public String getInitNamespaceIdxSql()
      Gets the DDL for creating the idx_namespace index.
      Returns:
      the namespace index creation DDL
    • setInitNamespaceIdxSql

      public void setInitNamespaceIdxSql(String initNamespaceIdxSql)
      Sets the DDL for creating the idx_namespace index.
      Parameters:
      initNamespaceIdxSql - the namespace index creation DDL to set
    • getInitInstanceIdIdxSql

      public String getInitInstanceIdIdxSql()
      Gets the DDL for creating the idx_instance_id index.
      Returns:
      the instance id index creation DDL
    • setInitInstanceIdIdxSql

      public void setInitInstanceIdIdxSql(String initInstanceIdIdxSql)
      Sets the DDL for creating the idx_instance_id index.
      Parameters:
      initInstanceIdIdxSql - the instance id index creation DDL to set