Package io.permazen.core
Class TransactionConfig
java.lang.Object
io.permazen.core.TransactionConfig
Configuration for a
Transaction.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forTransactionConfigs.static enumConfigures if and when to automatically detect and remove unused schemas from a database. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionConfig.Builderbuilder()Create aTransactionConfig.Builder.copy()Create aTransactionConfig.Builderthat is pre-configured as a copy of this instance.ConfigureKVDatabasetransaction options.Get the schema model to use.Get when to automatically detect and remove unused schemas.booleanGet whether it is allowed to register a new schema model into the database.Convenience method that uses this instance to create a new transaction in the given database.toString()
-
Method Details
-
getSchemaModel
Get the schema model to use.- Returns:
- the schema to use during transactions
- See Also:
-
TransactionConfig.Builder.schemaModel
-
isAllowNewSchema
public boolean isAllowNewSchema()Get whether it is allowed to register a new schema model into the database.- Returns:
- whether registering a new schema is allowed
- See Also:
-
TransactionConfig.Builder.allowNewSchema
-
getSchemaRemoval
Get when to automatically detect and remove unused schemas.- Returns:
- if and when to remove unused schemas
- See Also:
-
TransactionConfig.Builder.schemaRemoval
-
getKVOptions
ConfigureKVDatabasetransaction options.- Returns:
- transaction options for the underlying
KVDatabase, or null for none - See Also:
-
builder
Create aTransactionConfig.Builder.- Returns:
- new transaction config builder
-
copy
Create aTransactionConfig.Builderthat is pre-configured as a copy of this instance.- Returns:
- new pre-configured transaction config builder
-
newTransaction
Convenience method that uses this instance to create a new transaction in the given database.- Parameters:
db- database in which to open a new transaction- Returns:
- new transaction in
db - Throws:
IllegalArgumentException- ifdbis null- See Also:
-
toString
-