Package io.ocfl.core.db
Class ObjectDetailsDatabaseBuilder
java.lang.Object
io.ocfl.core.db.ObjectDetailsDatabaseBuilder
Constructs
ObjectDetailsDatabase
instances-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Constructs a newObjectDetailsDatabase
instance using the given dataSource.dataSource
(DataSource dataSource) Sets the DataSource to use for the object details table.storeInventory
(boolean storeInventory) If serialized inventories should be stored in the database.Sets the name of the table to use to store object details.Used to override the amount of time the client will wait to obtain a lock.
-
Constructor Details
-
ObjectDetailsDatabaseBuilder
public ObjectDetailsDatabaseBuilder()
-
-
Method Details
-
storeInventory
If serialized inventories should be stored in the database. Default: true.- Parameters:
storeInventory
- true if serialized inventories should be stored in the database.- Returns:
- builder
-
waitTime
Used to override the amount of time the client will wait to obtain a lock. Default: 10 seconds.- Parameters:
waitTime
- wait time (MariaDB uses seconds, while PostgreSQL and H2 use milliseconds)timeUnit
- unit of time- Returns:
- builder
-
dataSource
Sets the DataSource to use for the object details table. This is a required field.- Parameters:
dataSource
- the DataSource- Returns:
- builder
-
tableName
Sets the name of the table to use to store object details. Default: ocfl_object_details- Parameters:
tableName
- the table name to use- Returns:
- builder
-
build
Constructs a newObjectDetailsDatabase
instance using the given dataSource. If the database does not already contain an object details table, it attempts to create one.- Returns:
- ObjectDetailsDatabase
-