remove event types
We only have removal events. The additional complexity of having a generic interface for many different event types does not pay off.
This commit is contained in:
@@ -37,7 +37,6 @@ import org.lucares.pdb.datastore.lang.QueryLanguageParser;
|
||||
import org.lucares.pdb.map.PersistentMap;
|
||||
import org.lucares.utils.Preconditions;
|
||||
import org.lucares.utils.cache.HotEntryCache;
|
||||
import org.lucares.utils.cache.HotEntryCache.EventType;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -104,8 +103,7 @@ public class DataStore implements AutoCloseable {
|
||||
queryCompletionIndex = new QueryCompletionIndex(storageBasePath);
|
||||
|
||||
writerCache = new HotEntryCache<>(Duration.ofSeconds(10)/* , 1000 */);
|
||||
// writerCache.addListener((tags, writer) -> writer.close());
|
||||
writerCache.addListener(event -> event.getValue().close(), EventType.EVICTED, EventType.REMOVED);
|
||||
writerCache.addListener((key, value) -> value.close());
|
||||
}
|
||||
|
||||
private Path keyCompressionFile(final Path dataDirectory) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user