@Override public IndexMetadata activateIndex(String indexName) throws IOException, SAXException { IndexMetadata metadata = managedCores.getIndexMetadata(indexName); if(metadata != null && metadata.getState() == ManagedIndexState.INACTIVE){ try { activateCore(metadata, server); metadata.setState(ManagedIndexState.ACTIVE); } catch (IOException e) { metadata.setError(e); throw e; } catch (SAXException e) { metadata.setError(e); throw e; } catch (RuntimeException e) { metadata.setError(e); throw e; } finally { managedCores.store(metadata); } } return metadata; } @Override
@Override public IndexMetadata activateIndex(String indexName) throws IOException, SAXException { IndexMetadata metadata = managedCores.getIndexMetadata(indexName); if(metadata != null && metadata.getState() == ManagedIndexState.INACTIVE){ try { activateCore(metadata, server); metadata.setState(ManagedIndexState.ACTIVE); } catch (IOException e) { metadata.setError(e); throw e; } catch (SAXException e) { metadata.setError(e); throw e; } catch (RuntimeException e) { metadata.setError(e); throw e; } finally { managedCores.store(metadata); } } return metadata; } @Override
info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } catch (SAXException e) { log.error("SAXException while activating Index '"+ info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } catch (RuntimeException e) { log.error("Exception while activating Index '"+ info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } finally { managedCores.store(info.metadata); info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } finally {
info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } catch (SAXException e) { log.error("SAXException while activating Index '"+ info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } catch (RuntimeException e) { log.error("Exception while activating Index '"+ info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } finally { managedCores.store(info.metadata); info.metadata.getServerName()+':'+ info.metadata.getIndexName()+"'!",e); info.metadata.setError(e); } finally {
log.info(" ... index {} successfully started!",indexName); } catch (IOException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e); } catch (SAXException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e); } catch (RuntimeException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e);
log.info(" ... index {} successfully started!",indexName); } catch (IOException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e); } catch (SAXException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e); } catch (RuntimeException e) { metadata.setError(e); log.error("Unable to activate previously active SolrIndex '"+ metadata.getIndexReference()+"'!",e);
@Override public IndexMetadata deactivateIndex(String indexName) { IndexMetadata metadata = managedCores.getIndexMetadata(indexName); if(metadata != null && metadata.getState() == ManagedIndexState.ACTIVE){ try { deactivateCore(indexName, server); metadata.setState(ManagedIndexState.INACTIVE); } catch (RuntimeException e) { metadata.setError(e); } finally { managedCores.store(metadata); } } return metadata; } @Override
@Override public IndexMetadata deactivateIndex(String indexName) { IndexMetadata metadata = managedCores.getIndexMetadata(indexName); if(metadata != null && metadata.getState() == ManagedIndexState.ACTIVE){ try { deactivateCore(indexName, server); metadata.setState(ManagedIndexState.INACTIVE); } catch (RuntimeException e) { metadata.setError(e); } finally { managedCores.store(metadata); } } return metadata; } @Override