public class DBMaker
Modifier and Type | Class and Description |
---|---|
static class |
DBMaker.Maker |
Modifier and Type | Method and Description |
---|---|
DBMaker.Maker |
fileDB(java.lang.String file) |
DBMaker.Maker |
fileDB(java.io.File file) |
DBMaker.Maker |
heapDB()
Creates new in-memory database which stores all data on heap without serialization.
This mode should be very fast, but data will affect Garbage Collector the same way as traditional Java Collections.
|
DB.HashMapMaker<?,?> |
heapShardedHashMap(int concurrency) |
DB.HashSetMaker<?> |
heapShardedHashSet(int concurrency) |
DBMaker.Maker |
memoryDB()
Creates new in-memory database. Changes are lost after JVM exits.
This option serializes data into {@code byte[]},
so they are not affected by Garbage Collector.
|
DBMaker.Maker |
memoryDirectDB() |
DB.HashMapMaker<?,?> |
memoryShardedHashMap(int concurrency) |
DB.HashSetMaker<?> |
memoryShardedHashSet(int concurrency) |
DBMaker.Maker |
tempFileDB()
Creates new database in temporary folder. Files are deleted after store was closed
|
DBMaker.Maker |
volumeDB(Volume volume,
boolean volumeExists) |
public static DBMaker INSTANCE
public DBMaker.Maker tempFileDB()
Creates new database in temporary folder. Files are deleted after store was closed
public DBMaker.Maker fileDB(java.lang.String file)
public DBMaker.Maker fileDB(java.io.File file)
public DBMaker.Maker heapDB()
Creates new in-memory database which stores all data on heap without serialization. This mode should be very fast, but data will affect Garbage Collector the same way as traditional Java Collections.
public DBMaker.Maker memoryDB()
Creates new in-memory database. Changes are lost after JVM exits. This option serializes data into {@code byte[]}, so they are not affected by Garbage Collector.
public DBMaker.Maker memoryDirectDB()
public DBMaker.Maker volumeDB(Volume volume, boolean volumeExists)
public DB.HashSetMaker<?> memoryShardedHashSet(int concurrency)
public DB.HashSetMaker<?> heapShardedHashSet(int concurrency)
public DB.HashMapMaker<?,?> memoryShardedHashMap(int concurrency)
public DB.HashMapMaker<?,?> heapShardedHashMap(int concurrency)