use of org.wso2.carbon.apimgt.persistence.APIPersistence in project carbon-apimgt by wso2.
the class PersistenceManager method getPersistenceInstance.
public static APIPersistence getPersistenceInstance(Map<String, String> configs, Properties properties) {
if (log.isDebugEnabled()) {
log.debug("Persistence configs " + Arrays.asList(configs));
}
if (persistence == null) {
ServiceReferenceHolder serviceReferenceHolder = ServiceReferenceHolder.getInstance();
serviceReferenceHolder.setPersistenceConfigs(configs);
if (serviceReferenceHolder.getApiPersistence() != null) {
persistence = serviceReferenceHolder.getApiPersistence();
} else {
if (persistence == null) {
persistence = new RegistryPersistenceImpl(properties);
}
}
}
return persistence;
}
Aggregations