Bugfix
This commit is contained in:
parent
4c07228e54
commit
dea0eea5b7
@ -17,7 +17,7 @@ public class ObjectStrangeDbList<T> extends StrangeDbList<T> {
|
||||
return indices;
|
||||
}
|
||||
|
||||
public ObjectStrangeDbList() {
|
||||
protected ObjectStrangeDbList() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import it.cavallium.strangedb.java.objects.EnhancedObject;
|
||||
import it.cavallium.strangedb.java.database.IDatabaseTools;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
public abstract class StrangeDbList<T> extends EnhancedObject {
|
||||
|
@ -264,14 +264,22 @@ public class Performance {
|
||||
}
|
||||
|
||||
public static void generateDb() throws IOException {
|
||||
dbDataFile = Files.createFile(rootDirectory.resolve("db_data.dat"));
|
||||
dbBlocksFile = Files.createFile(rootDirectory.resolve("db_blocks.dat"));
|
||||
dbReferencesFile = Files.createFile(rootDirectory.resolve("db_references.dat"));
|
||||
dbDataFile = rootDirectory.resolve("db_data.dat");
|
||||
dbBlocksFile = rootDirectory.resolve("db_blocks.dat");
|
||||
dbReferencesFile = rootDirectory.resolve("db_references.dat");
|
||||
deleteDbFolders();
|
||||
Files.createFile(dbDataFile);
|
||||
Files.createFile(dbBlocksFile);
|
||||
Files.createFile(dbReferencesFile);
|
||||
db = new DatabaseJava(dbDataFile, dbBlocksFile, dbReferencesFile);
|
||||
}
|
||||
|
||||
public static void deleteDb() throws IOException {
|
||||
db.close();
|
||||
deleteDbFolders();
|
||||
}
|
||||
|
||||
public static void deleteDbFolders() throws IOException {
|
||||
Files.deleteIfExists(dbDataFile);
|
||||
Files.deleteIfExists(dbBlocksFile);
|
||||
Files.deleteIfExists(dbReferencesFile);
|
||||
|
Loading…
Reference in New Issue
Block a user