this.caches.put(coreIdentifier, cache); } catch (final CacheException ex) { throw new InitializationException("Cannot create cache: " + ex.getMessage(), ex); } catch (IOException ex) { throw new InitializationException("Invalid Solr resource: " + ex.getMessage(), ex);
@Override public void initialize() throws InitializationException { try { this.baseServiceURL = this.configuration.getProperty("phenotips.ontologies.hgnc.serviceURL", "http://rest.genenames.org/"); this.searchServiceURL = this.baseServiceURL + "search/"; this.infoServiceURL = this.baseServiceURL + "info"; this.fetchServiceURL = this.baseServiceURL + "fetch/"; this.cache = this.cacheFactory.createNewLocalCache(new CacheConfiguration()); EntryEvictionConfiguration infoConfig = new LRUEvictionConfiguration(1); infoConfig.setTimeToLive(300); this.infoCache = this.cacheFactory.createNewLocalCache(new CacheConfiguration(infoConfig)); } catch (final CacheException ex) { throw new InitializationException("Cannot create cache: " + ex.getMessage()); } QUERY_OPERATORS.put("OR", ""); QUERY_OPERATORS.put(DEFAULT_OPERATOR, DEFAULT_OPERATOR + ' '); QUERY_OPERATORS.put("NOT", "-"); }
@Override public void initialize(String serverName) throws InitializationException { try { this.server = new EmbeddedSolrServer(this.cores.getContainer(), serverName); this.cache = this.cacheFactory.createNewLocalCache(new CacheConfiguration()); } catch (RuntimeException ex) { throw new InitializationException("Invalid URL specified for the Solr server: {}"); } catch (final CacheException ex) { throw new InitializationException("Cannot create cache: " + ex.getMessage()); } }
@Override public void initialize() throws InitializationException { try { this.server = new HttpSolrServer("http://localhost:8080/solr/" + this.getName() + "/"); this.cache = this.cacheFactory.createNewLocalCache(new CacheConfiguration()); } catch (RuntimeException ex) { throw new InitializationException("Invalid URL specified for the Solr server: {}"); } catch (final CacheException ex) { throw new InitializationException("Cannot create cache: " + ex.getMessage()); } }