I want create a storage manager with many channels and in a specific directory, unfortunately is not very easy to implement this requirement. The example of the homepage microstream doesn't work, but one solution I could create one instance, but after the load the microstream directory I receive a new exceptions from microstream.
I try to implement following solution:
final var name = this.filePath[this.filePath.length - 1];
this.getVertx().fileSystem().mkdirsBlocking(String.join(File.separator, this.filePath));
this.storageManager = EmbeddedStorageConfigurationBuilder.New()
.setChannelCount(this.numberOfThreads)
.setStorageDirectory(String.join(File.separator, this.filePath))
.setDataFileSuffix(".bin")
.createEmbeddedStorageFoundation()
.createEmbeddedStorageManager()
.start();
if (this.storageManager.root() == null) {
final var root = this.tClass.getDeclaredConstructor().newInstance();
this.storageManager.setRoot(root);
this.storageManager.storeRoot();
}
this.executor = this.getVertx().createSharedWorkerExecutor(name, this.numberOfThreads);
Exceptions:
one.microstream.storage.exceptions.StorageException: Non-deleted non-empty data file not found: channel 2, file 1
I don't know what microstream mean with "a non deleted non empty data file" ?