Class DBDatabaseCluster.Configuration
- java.lang.Object
-
- nz.co.gregs.dbvolution.databases.DBDatabaseCluster.Configuration
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- DBDatabaseCluster
public static class DBDatabaseCluster.Configuration extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Configuration()
Configuration(boolean useAutoRebuild, boolean useAutoReconnect, boolean useAutoStart, boolean useAutoConnect)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DBDatabaseCluster.Configuration
autoRebuild()
A configuration that will try to restore the data from the previous instance of this cluster.static DBDatabaseCluster.Configuration
autoRebuildAndReconnect()
Deprecated.despite the method name, this will also start the cluster.static DBDatabaseCluster.Configuration
autoRebuildReconnectAndStart()
A configuration that will try to restore the data from the previous instance of this cluster AND try to connect quarantined databases will the cluster is running.static DBDatabaseCluster.Configuration
autoReconnect()
A configuration that will try to connect quarantined databases will the cluster is running.static DBDatabaseCluster.Configuration
autoStart()
Use for a database that does not automatically rebuild the data when restarting the cluster nor reconnect quarantined databases after an error but does automatically start synchronising databases.static DBDatabaseCluster.Configuration
fullyManual()
Use for a database that does not automatically rebuild the data when restarting the cluster nor reconnect quarantined databases after an error.boolean
isUseAutoConnect()
Auto-connect loads the list of cluster members from the previous instance.boolean
isUseAutoRebuild()
Auto-rebuild will automatically reload the tracked tables, connect to the authoritative database of the previous instance of this cluster, and reload the data for the tracked and required tables.boolean
isUseAutoReconnect()
Auto-reconnect instructs the cluster to reconnect to any cluster members disconnected during processing.boolean
isUseAutoStart()
Auto-start instructs the cluster to immediately perform tasks required to make the cluster usable as a database.static DBDatabaseCluster.Configuration
manual()
Deprecated.This version of manual will automatically start the cluster, useautoStart()
insteadDBDatabaseCluster.Configuration
withAutoConnect()
Auto-connect loads the list of cluster members from the previous instance.DBDatabaseCluster.Configuration
withAutoRebuild()
Auto-rebuild will automatically reload the tracked tables, connect to the authoritative database of the previous instance of this cluster, and reload the data for the tracked and required tables.DBDatabaseCluster.Configuration
withAutoReconnect()
Auto-reconnect instructs the cluster to reconnect to any cluster members disconnected during processing.DBDatabaseCluster.Configuration
withAutoStart()
Auto-start instructs the cluster to immediately perform tasks required to make the cluster usable as a database.
-
-
-
Method Detail
-
autoStart
public static DBDatabaseCluster.Configuration autoStart()
Use for a database that does not automatically rebuild the data when restarting the cluster nor reconnect quarantined databases after an error but does automatically start synchronising databases.- Returns:
- a autostart configuration
-
manual
@Deprecated public static DBDatabaseCluster.Configuration manual()
Deprecated.This version of manual will automatically start the cluster, useautoStart()
insteadUse for a database that does not automatically rebuild the data when restarting the cluster nor reconnect quarantined databases after an error.- Returns:
- a manual configuration
-
fullyManual
public static DBDatabaseCluster.Configuration fullyManual()
Use for a database that does not automatically rebuild the data when restarting the cluster nor reconnect quarantined databases after an error.The database will not be started nor will databases in the previous cluster instance be re-added.
- Returns:
- a manual configuration
-
autoRebuild
public static DBDatabaseCluster.Configuration autoRebuild()
A configuration that will try to restore the data from the previous instance of this cluster.the TrackedTable list will also be rebuilt.
Auto-rebuild will automatically reload the tracked tables, connect to the authoritative database of the previous instance of this cluster, and reload the data for the tracked and required tables. This provides continuity of schema and data between instances of the cluster and removes the need to fully specify the schema within a DataRepo or configuration file.
Equivalent to new Configuration(true, false, true, false)- Returns:
- an auto-rebuild configuration
-
autoReconnect
public static DBDatabaseCluster.Configuration autoReconnect()
A configuration that will try to connect quarantined databases will the cluster is running.the TrackedTable list will also be rebuilt.
Auto-reconnect instructs the cluster to reconnect to any cluster members disconnected during processing. This includes databases that could not be connected to, and those that were quarantined due to errors.
Reconnected databases will be synchronized before use.
Equivalent to new Configuration(false, true, true, false)- Returns:
- an auto-reconnect configuration
-
autoRebuildAndReconnect
@Deprecated public static DBDatabaseCluster.Configuration autoRebuildAndReconnect()
Deprecated.despite the method name, this will also start the cluster. UseautoRebuildReconnectAndStart()
insteadA configuration that will try to restore the data from the previous instance of this cluster AND try to connect quarantined databases will the cluster is running. Equivalent to new Configuration(true, true, true, false)- Returns:
- an auto-rebuild and reconnect configuration
-
autoRebuildReconnectAndStart
public static DBDatabaseCluster.Configuration autoRebuildReconnectAndStart()
A configuration that will try to restore the data from the previous instance of this cluster AND try to connect quarantined databases will the cluster is running. Equivalent to new Configuration(true, true, true, false)- Returns:
- an auto-rebuild and reconnect configuration
-
isUseAutoRebuild
public boolean isUseAutoRebuild()
Auto-rebuild will automatically reload the tracked tables, connect to the authoritative database of the previous instance of this cluster, and reload the data for the tracked and required tables. This provides continuity of schema and data between instances of the cluster and removes the need to fully specify the schema within a DataRepo or configuration file.- Returns:
- TRUE if the cluster will try to reload data from the previous version of the cluster.
-
isUseAutoReconnect
public boolean isUseAutoReconnect()
Auto-reconnect instructs the cluster to reconnect to any cluster members disconnected during processing. This includes databases that could not be connected to, and those that were quarantined due to errors. Reconnected databases will be synchronized before use.- Returns:
- TRUE if the cluster will try to automatically reconnect and synchronize database while running.
-
isUseAutoStart
public boolean isUseAutoStart()
Auto-start instructs the cluster to immediately perform tasks required to make the cluster usable as a database. These tasks may include reloading the tracked tables and data of the previous instance, connecting to former members, synchronizing cluster members, starting the reconnection process, and more.- Returns:
- the useAutoStart
-
isUseAutoConnect
public boolean isUseAutoConnect()
Auto-connect loads the list of cluster members from the previous instance. This provides continuity of membership and removes the need fully specify the members in code or configurations files.- Returns:
- the useAutoConnect
-
withAutoRebuild
public DBDatabaseCluster.Configuration withAutoRebuild()
Auto-rebuild will automatically reload the tracked tables, connect to the authoritative database of the previous instance of this cluster, and reload the data for the tracked and required tables. This provides continuity of schema and data between instances of the cluster and removes the need to fully specify the schema within a DataRepo or configuration file.- Returns:
- TRUE if the cluster will try to reload data from the previous version of the cluster.
-
withAutoReconnect
public DBDatabaseCluster.Configuration withAutoReconnect()
Auto-reconnect instructs the cluster to reconnect to any cluster members disconnected during processing. This includes databases that could not be connected to, and those that were quarantined due to errors. Reconnected databases will be synchronized before use.- Returns:
- TRUE if the cluster will try to automatically reconnect and synchronize database while running.
-
withAutoStart
public DBDatabaseCluster.Configuration withAutoStart()
Auto-start instructs the cluster to immediately perform tasks required to make the cluster usable as a database. These tasks may include reloading the tracked tables and data of the previous instance, connecting to former members, synchronizing cluster members, starting the reconnection process, and more.- Returns:
- the useAutoStart
-
withAutoConnect
public DBDatabaseCluster.Configuration withAutoConnect()
Auto-connect loads the list of cluster members from the previous instance. This provides continuity of membership and removes the need fully specify the members in code or configurations files.- Returns:
- the useAutoConnect
-
-