use of com.bakdata.conquery.io.storage.xodus.stores.SingletonStore in project conquery by bakdata.
the class XodusStoreFactory method createIdMappingStore.
@Override
public SingletonStore<EntityIdMap> createIdMappingStore(String pathName) {
final Environment environment = findEnvironment(pathName);
synchronized (openStoresInEnv) {
final BigStore<Boolean, EntityIdMap> bigStore = new BigStore<>(this, validator, environment, ID_MAPPING.storeInfo(), this::closeStore, this::removeStore, objectMapper);
openStoresInEnv.put(bigStore.getDataXodusStore().getEnvironment(), bigStore.getDataXodusStore());
openStoresInEnv.put(bigStore.getMetaXodusStore().getEnvironment(), bigStore.getMetaXodusStore());
return new SingletonStore<>(new CachedStore<>(bigStore));
}
}
Aggregations