Creates a database based on the input config.
Creates a database based on the input config.
Type of key
Type of value
Configuration to use to create the database
Number of concurrent opened Segments
For persistent Levels only. This can property will be ignored for MemoryLevels. Size of in-memory key-values
For persistent Levels only. This can property will be ignored for MemoryLevels. Sets the max interval at which key-values get dropped from the cache. The delays are dynamically adjusted based on the current size of the cache to stay close the set cacheSize.
For persistent Levels only. This can property will be ignored for MemoryLevels. Sets the max interval at which Segments get closed. The delays are dynamically adjusted based on the current number of open Segments.
Converts keys to Bytes
Converts values to Bytes
Sort order for keys
ExecutionContext
Database instance
Default execution context for all databases.
Default execution context for all databases.
This can be overridden by provided an implicit parameter in the scope of where the database is initialized.
A 2 Leveled (Level0 & Level1), in-memory database.
A 2 Leveled (Level0 & Level1), in-memory database.
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
size of Level0 maps before they are converted into Segments
size of Level1 Segments
Controls the write speed.
Converts keys to Bytes
Converts values to Bytes
Sort order for keys
A 3 Leveled in-memory database where the 3rd is persistent.
A 3 Leveled in-memory database where the 3rd is persistent.
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
Type of key
Type of value
Root directory for all Level where appendix folder & files are created
Number of concurrent Segments opened
Size of LevelZero's maps (WAL)
Total size of in-memory Level (Level1) before Segments gets pushed to persistent Level (Level2)
Numbers of Segments to push from in-memory Level (Level1) to persistent Level (Level2)
Size of Level1's Segments
Size of Level2's Segments
Memory-maps Level2 Segments
Memory-maps Level2's appendix file
Size of
Secondary directories for all Levels where Segments get distributed.
Sets the max interval at which key-values get dropped from the cache. The delays are dynamically adjusted based on the current size of the cache to stay close the set cacheSize.
Sets the max interval at which Segments get closed. The delays are dynamically adjusted based on the current number of open Segments.
Controls the write speed.
Converts keys to Bytes
Converts values to Bytes
Sort order for keys
ExecutionContext
Database instance
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
A pre-configured, 8 Leveled, persistent database where Level1 accumulates a minimum of 10 Segments before pushing Segments to lower Level.
A pre-configured, 8 Leveled, persistent database where Level1 accumulates a minimum of 10 Segments before pushing Segments to lower Level.
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
Type of key
Type of value
Root directory for all Level where appendix folder & files are created
Number of concurrent Segments opened
Size of in-memory key-values
Size of LevelZero's maps (WAL)
Memory-maps LevelZero maps files if set to true else reverts java.nio.FileChannel
Memory-maps Levels appendix files if set to true else reverts java.nio.FileChannel
Memory-maps Levels Segment files if set to true else reverts java.nio.FileChannel
Minimum size of Segment files in each Level
Size of the appendix file before it's flushed. Appendix files are append only log files. Flushing removes deleted entries in the file hence reducing the size of the file.
Secondary directories for all Levels where Segments get distributed.
Sets the max interval at which key-values get dropped from the cache. The delays are dynamically adjusted based on the current size of the cache to stay close the set cacheSize.
Sets the max interval at which Segments get closed. The delays are dynamically adjusted based on the current number of open Segments.
Controls the write speed.
Converts keys to Bytes
Converts values to Bytes
Sort order for keys
ExecutionContext
Database instance
For custom configurations read documentation on website: http://www.swaydb.io/configuring-levels
Documentation: http://www.swaydb.io/api/repairAppendix
Instance used for creating/initialising databases.