Package io.permazen.core
Class TransactionConfig
java.lang.Object
io.permazen.core.TransactionConfig
Configuration for a
Transaction
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder forTransactionConfig
s.static enum
Configures if and when to automatically detect and remove unused schemas from a database. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionConfig.Builder
builder()
Create aTransactionConfig.Builder
.copy()
Create aTransactionConfig.Builder
that is pre-configured as a copy of this instance.ConfigureKVDatabase
transaction options.Get the schema model to use.Get when to automatically detect and remove unused schemas.boolean
Get 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
ConfigureKVDatabase
transaction 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.Builder
that 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
- ifdb
is null- See Also:
-
toString
-