Uses of Class
org.cojen.tupl.DatabaseConfig
Packages that use DatabaseConfig
-
Uses of DatabaseConfig in org.cojen.tupl
Methods in org.cojen.tupl that return DatabaseConfigModifier and TypeMethodDescriptionSet the base file name for the database, which must reside in an ordinary file directory.DatabaseConfig.baseFilePath
(String path) Set the base file name for the database, which must reside in an ordinary file directory.DatabaseConfig.cachePriming
(boolean priming) Enable automatic cache priming, which writes a priming set into a special file when the process is cleanly shutdown.DatabaseConfig.cacheSize
(long size) Convenience method which sets the minimum and maximum cache size, overriding the default.DatabaseConfig.checkpointDelayThreshold
(long delay, TimeUnit unit) Set the maximum delay before an automatic checkpoint is performed, regardless of the redo log size threshold.DatabaseConfig.checkpointRate
(long rate, TimeUnit unit) Set the rate at which checkpoints are automatically performed.DatabaseConfig.checkpointSizeThreshold
(long bytes) Set the minimum redo log size required for an automatic checkpoint to actually be performed.DatabaseConfig.checksumPages
(Supplier<? extends Checksum> factory) Enable 32-bit checksums for all of the underlying database pages.DatabaseConfig.cleanShutdown
(boolean shutdown) When the process is cleanly shutdown, attempt to issue a full database shutdown.DatabaseConfig.clone()
DatabaseConfig.compressPages
(int fullPageSize, long cacheSize, Supplier<? extends PageCompressor> factory) Compress the underlying database pages, reducing overall size at the cost of performance.DatabaseConfig.createFilePath
(boolean mkdirs) Set true to create directories for the base and data file, if they don't already exist.DatabaseConfig.customHandlers
(Map<String, ? extends CustomHandler> handlers) Provide handlers for recovering custom transactional operations.Set the data file for the database, which by default resides in the same directory as the base file.Stripe the database data file across several files, expected to be on separate devices.DatabaseConfig.dataPageArray
(Supplier<? extends PageArray> factory) Use a custom storage layer instead of the default data file.DatabaseConfig.dataPageArray
(PageArray array) Use a custom storage layer instead of the default data file.DatabaseConfig.directPageAccess
(boolean direct) Deprecated.direct page access is always enabledDatabaseConfig.durabilityMode
(DurabilityMode durabilityMode) Set the default transaction durability mode, which isSYNC
if not overridden.DatabaseConfig.enableJMX
(boolean enable) Enable full encryption of the data files, transaction logs, snapshots, and cache priming sets.DatabaseConfig.eventListener
(EventListener listener) Set a listener which receives notifications of actions being performed by the database.DatabaseConfig.eventListeners
(EventListener... listeners) Set multiple listeners which receive notifications of actions being performed by the database.DatabaseConfig.lockTimeout
(long timeout, TimeUnit unit) Set the default lock acquisition timeout, which is 1 second if not overridden.DatabaseConfig.lockUpgradeRule
(LockUpgradeRule lockUpgradeRule) Set the default lock upgrade rule, which isSTRICT
if not overridden.DatabaseConfig.mapDataFiles
(boolean mapped) Enable memory mapping of the data files.DatabaseConfig.maxCacheSize
(long maxBytes) Set the maximum cache size, overriding the default.DatabaseConfig.maxCheckpointThreads
(int num) Specify the maximum number of threads for performing checkpointing, to speed it up.DatabaseConfig.maxReplicaThreads
(int num) If replication is enabled, specify the maximum number of threads to process incoming changes.DatabaseConfig.minCacheSize
(long minBytes) Set the minimum cache size, overriding the default.DatabaseConfig.pageSize
(int size) Set the page size, which is 4096 bytes by default.DatabaseConfig.prepareHandlers
(Map<String, ? extends PrepareHandler> handlers) Provide handlers for recovering prepared transactions.DatabaseConfig.readOnly
(boolean readOnly) Open the database file in read only mode.DatabaseConfig.replicate
(ReplicatorConfig config) Enable replication using the given configuration.DatabaseConfig.replicate
(StreamReplicator repl) Enable replication with an explicitStreamReplicator
instance.DatabaseConfig.syncWrites
(boolean fileSync) Set true to ensure all writes to the main database file are immediately durable, although not checkpointed.Methods in org.cojen.tupl with parameters of type DatabaseConfigModifier and TypeMethodDescriptionstatic Database
Database.destroy
(DatabaseConfig config) Delete the contents of an existing database, and replace it with an empty one.static Database
Database.open
(DatabaseConfig config) Open a database, creating it if necessary.static Database
Database.rebuild
(DatabaseConfig oldConfig, DatabaseConfig newConfig, int numThreads) Open an existing database and copy all the data into a new database, which can have a different configuration.static Database
Database.restoreFromSnapshot
(DatabaseConfig config, InputStream in) Restore from a snapshot, into the data files defined by the given configuration.