Class MachineProperties.Jdbc
java.lang.Object
me.ahoo.cosid.spring.boot.starter.machine.MachineProperties.Jdbc
- Enclosing class:
- MachineProperties
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the DDL for creating thecosid_machinetable.Gets the DDL for creating theidx_instance_idindex.Gets the DDL for creating theidx_namespaceindex.booleanChecks whether automaticcosid_machinetable initialization is enabled.voidsetEnableAutoInitCosidMachineTable(boolean enableAutoInitCosidMachineTable) Sets whether automaticcosid_machinetable initialization is enabled.voidsetInitCosIdMachineTableSql(String initCosIdMachineTableSql) Sets the DDL for creating thecosid_machinetable.voidsetInitInstanceIdIdxSql(String initInstanceIdIdxSql) Sets the DDL for creating theidx_instance_idindex.voidsetInitNamespaceIdxSql(String initNamespaceIdxSql) Sets the DDL for creating theidx_namespaceindex.
-
Constructor Details
-
Jdbc
public Jdbc()
-
-
Method Details
-
isEnableAutoInitCosidMachineTable
public boolean isEnableAutoInitCosidMachineTable()Checks whether automaticcosid_machinetable initialization is enabled.- Returns:
- true if auto-init is enabled, false otherwise
-
setEnableAutoInitCosidMachineTable
public void setEnableAutoInitCosidMachineTable(boolean enableAutoInitCosidMachineTable) Sets whether automaticcosid_machinetable initialization is enabled.- Parameters:
enableAutoInitCosidMachineTable- true to enable auto-init, false otherwise
-
getInitCosIdMachineTableSql
Gets the DDL for creating thecosid_machinetable.- Returns:
- the table creation DDL
-
setInitCosIdMachineTableSql
Sets the DDL for creating thecosid_machinetable.- Parameters:
initCosIdMachineTableSql- the table creation DDL to set
-
getInitNamespaceIdxSql
Gets the DDL for creating theidx_namespaceindex.- Returns:
- the namespace index creation DDL
-
setInitNamespaceIdxSql
Sets the DDL for creating theidx_namespaceindex.- Parameters:
initNamespaceIdxSql- the namespace index creation DDL to set
-
getInitInstanceIdIdxSql
Gets the DDL for creating theidx_instance_idindex.- Returns:
- the instance id index creation DDL
-
setInitInstanceIdIdxSql
Sets the DDL for creating theidx_instance_idindex.- Parameters:
initInstanceIdIdxSql- the instance id index creation DDL to set
-