use of org.mule.runtime.core.api.config.MuleProperties.OBJECT_STORE_MANAGER in project mule by mulesoft.
the class SpringMuleContextServiceConfigurator method createLocalObjectStoreBeanDefinitions.
private void createLocalObjectStoreBeanDefinitions() {
AtomicBoolean anyBaseStoreWasRedefined = new AtomicBoolean(false);
OBJECT_STORE_NAME_TO_LOCAL_OBJECT_STORE_NAME.entrySet().forEach(objectStoreLocal -> customServiceRegistry.getOverriddenService(objectStoreLocal.getKey()).ifPresent(customService -> {
anyBaseStoreWasRedefined.set(true);
beanDefinitionRegistry.registerBeanDefinition(objectStoreLocal.getKey(), getCustomServiceBeanDefinition(customService));
}));
if (anyBaseStoreWasRedefined.get()) {
beanDefinitionRegistry.registerBeanDefinition(LOCAL_OBJECT_STORE_MANAGER, getBeanDefinitionBuilder(MuleObjectStoreManager.class).addPropertyValue("basePersistentStoreKey", OBJECT_LOCAL_STORE_PERSISTENT).addPropertyValue("baseTransientStoreKey", OBJECT_LOCAL_STORE_IN_MEMORY).getBeanDefinition());
} else {
beanDefinitionRegistry.registerAlias(OBJECT_STORE_MANAGER, LOCAL_OBJECT_STORE_MANAGER);
}
}
Aggregations