Package io.permazen.core
Enum Class TransactionConfig.SchemaRemoval
- All Implemented Interfaces:
Serializable
,Comparable<TransactionConfig.SchemaRemoval>
,Constable
- Enclosing class:
- TransactionConfig
Configures if and when to automatically detect and remove unused schemas from a database.
When enabled, schema removal occurs at the beginning of a transaction.
- See Also:
-
TransactionConfig.Builder.schemaRemoval
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPerform automatic schema removal at the start of every transaction.Perform automatic schema removal at the start of the very first transaction, and any other transaction configured differently from the previous transaction.Disable automatic schema removal.Perform automatic schema removal only at the start of the very first transaction. -
Method Summary
Modifier and TypeMethodDescriptionboolean
shouldRemove
(boolean firstTransaction, boolean newConfig) Returns the enum constant of this class with the specified name.static TransactionConfig.SchemaRemoval[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEVER
Disable automatic schema removal. -
ONCE
Perform automatic schema removal only at the start of the very first transaction. -
CONFIG_CHANGE
Perform automatic schema removal at the start of the very first transaction, and any other transaction configured differently from the previous transaction. -
ALWAYS
Perform automatic schema removal at the start of every transaction.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
shouldRemove
public boolean shouldRemove(boolean firstTransaction, boolean newConfig)
-