Package io.permazen.core
Class TransactionConfig
java.lang.Object
io.permazen.core.TransactionConfig
Configuration for a
Transaction
.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionConfig.Builder
builder()
Create aTransactionConfig.Builder
.ConfigureKVDatabase
transaction options.Get the schema model to use.boolean
Get whether it is allowed to register a new schema model into the database.boolean
Configure whether automatic schema garbage collection should be enabled.Convenience method that uses this instance to create a new transaction in the given database.
-
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
-
isGarbageCollectSchemas
public boolean isGarbageCollectSchemas()Configure whether automatic schema garbage collection should be enabled.- Returns:
- whether automatically garbage collect obsolete schemas
- See Also:
-
TransactionConfig.Builder.garbageCollectSchemas
-
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
-
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:
-