Class TransactionConfig

java.lang.Object
io.permazen.core.TransactionConfig

public final class TransactionConfig extends Object
Configuration for a Transaction.
  • Method Details

    • getSchemaModel

      public SchemaModel 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

      public Map<String,?> getKVOptions()
      Configure KVDatabase transaction options.
      Returns:
      transaction options for the underlying KVDatabase, or null for none
      See Also:
    • builder

      public static TransactionConfig.Builder builder()
      Returns:
      new transaction config builder
    • newTransaction

      public Transaction newTransaction(Database db)
      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 - if db is null
      See Also: