Update database
This commit is contained in:
parent
fa347a2c17
commit
daf48f0330
2
pom.xml
2
pom.xml
@ -114,7 +114,7 @@
|
||||
<dependency>
|
||||
<groupId>it.cavallium</groupId>
|
||||
<artifactId>dbengine</artifactId>
|
||||
<version>3.0.172</version>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
@ -32,6 +32,7 @@ import it.cavallium.dbengine.database.LLDictionaryResultType;
|
||||
import it.cavallium.dbengine.database.LLKeyValueDatabase;
|
||||
import it.cavallium.dbengine.database.UpdateMode;
|
||||
import it.cavallium.dbengine.database.UpdateReturnMode;
|
||||
import it.cavallium.dbengine.database.disk.DatabaseOptions;
|
||||
import it.unimi.dsi.fastutil.booleans.BooleanArrayList;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
@ -61,13 +62,13 @@ public class DiskCache implements URLsDiskHandler, URLsWriter {
|
||||
this.diskMetadataSerializer = new DiskMetadataSerializer(db.getAllocator());
|
||||
}
|
||||
|
||||
public static Mono<DiskCache> open(LLDatabaseConnection databaseConnection, String dbName, boolean lowMemory) {
|
||||
public static Mono<DiskCache> open(LLDatabaseConnection databaseConnection,
|
||||
String dbName,
|
||||
DatabaseOptions databaseOptions) {
|
||||
return databaseConnection
|
||||
.getDatabase(dbName,
|
||||
List.of(Column.dictionary("file-content"), Column.dictionary("file-metadata")),
|
||||
Map.of("enableColumnBug", "true"),
|
||||
lowMemory,
|
||||
false
|
||||
databaseOptions
|
||||
)
|
||||
.flatMap(db -> Mono.zip(
|
||||
Mono.just(db).single(),
|
||||
|
Loading…
Reference in New Issue
Block a user