Search in sources :

Example 1 with SingletonStore

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));
    }
}
Also used : SingletonStore(com.bakdata.conquery.io.storage.xodus.stores.SingletonStore) BigStore(com.bakdata.conquery.io.storage.xodus.stores.BigStore) Environment(jetbrains.exodus.env.Environment) EntityIdMap(com.bakdata.conquery.models.identifiable.mapping.EntityIdMap)

Aggregations

BigStore (com.bakdata.conquery.io.storage.xodus.stores.BigStore)1 SingletonStore (com.bakdata.conquery.io.storage.xodus.stores.SingletonStore)1 EntityIdMap (com.bakdata.conquery.models.identifiable.mapping.EntityIdMap)1 Environment (jetbrains.exodus.env.Environment)1