/** * Invokes {@link #shutDown()}. */ @Override protected void finalize() throws Throwable { if(isOpen()) { if (log.isInfoEnabled()) log.info(""); shutDown(); } super.finalize(); }
/** * Invokes {@link #shutDown()}. */ @Override protected void finalize() throws Throwable { if(isOpen()) { if (log.isInfoEnabled()) log.info(""); shutDown(); } super.finalize(); }
public void run() { final Random r = new Random(); while(true) { try { Thread.sleep(r.nextInt(50000)); if (sail.get().isOpen()) { log.warn("SHUTDOWN NOW"); sail.get().shutDown(); } } catch (InterruptedException e) { break; } catch (SailException e) { log.warn(e); } } } };
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override public void destroy() throws Exception { if (sail.isOpen()) { sail.shutDown(); } if (sail instanceof BigdataSail) { ((BigdataSail) sail).__tearDownUnitTest(); } }
@Override public void destroy() throws Exception { if (sail.isOpen()) { sail.shutDown(); } if (sail instanceof BigdataSail) { ((BigdataSail) sail).__tearDownUnitTest(); } }
@Override public void close() { super.close(); try { if (m_repo.getSail().isOpen()) m_repo.shutDown(); } catch (RepositoryException e) { // Per the API. throw new IllegalStateException(e); } }
@Override public void close() { super.close(); try { if (m_repo.getSail().isOpen()) m_repo.shutDown(); } catch (RepositoryException e) { // Per the API. throw new IllegalStateException(e); } }
/** * <strong>DO NOT INVOKE FROM APPLICATION CODE</strong> - this method * deletes the KB instance and destroys the backing database instance. It is * used to help tear down unit tests. */ public void __tearDownUnitTest() { closeOnShutdown = false; try { if(isOpen()) shutDown(); // database.__tearDownUnitTest(); getIndexManager().destroy(); } catch (Throwable t) { log.error("Problem during shutdown: " + t, t); } }
/** * <strong>DO NOT INVOKE FROM APPLICATION CODE</strong> - this method * deletes the KB instance and destroys the backing database instance. It is * used to help tear down unit tests. */ public void __tearDownUnitTest() { closeOnShutdown = false; try { if(isOpen()) shutDown(); // database.__tearDownUnitTest(); getIndexManager().destroy(); } catch (Throwable t) { log.error("Problem during shutdown: " + t, t); } }
public void run() { final Random r = new Random(); while(true) { try { Thread.sleep(r.nextInt(50000)); if (sail.get().isOpen()) { log.warn("SHUTDOWN NOW"); sail.get().shutDown(); } } catch (InterruptedException e) { break; } catch (SailException e) { log.warn(e); } } } };
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override protected BigdataSail reopenSail(final BigdataSail sail) { // final Properties properties = sail.getProperties(); if (sail.isOpen()) { try { sail.shutDown(); } catch (Exception ex) { throw new RuntimeException(ex); } } return getSail(properties); }
@Override public void loadFiles() throws IOException { final BigdataOptionData opt = getOptionData(); final Journal jnl = opt.jnl; final String namespace = opt.namespace; final String[] loadSet = opt.loadSet.toArray(new String[0]); // Load data using the unisolated view. final AbstractTripleStore kb = (AbstractTripleStore) jnl .getResourceLocator().locate(namespace, ITx.UNISOLATED); if (opt.newKB && loadSet.length > 0) { final BigdataSail sail = new BigdataSail(kb); try { try { sail.initialize(); loadFiles(sail, loadSet); } finally { if (sail.isOpen()) sail.shutDown(); } } catch (Exception ex) { throw new RuntimeException(ex); } } // total #of edges in that graph. opt.nedges = kb.getStatementCount(); }
@Override public void loadFiles() throws IOException { final BigdataOptionData opt = getOptionData(); final Journal jnl = opt.jnl; final String namespace = opt.namespace; final String[] loadSet = opt.loadSet.toArray(new String[0]); // Load data using the unisolated view. final AbstractTripleStore kb = (AbstractTripleStore) jnl .getResourceLocator().locate(namespace, ITx.UNISOLATED); if (opt.newKB && loadSet.length > 0) { final BigdataSail sail = new BigdataSail(kb); try { try { sail.initialize(); loadFiles(sail, loadSet); } finally { if (sail.isOpen()) sail.shutDown(); } } catch (Exception ex) { throw new RuntimeException(ex); } } // total #of edges in that graph. opt.nedges = kb.getStatementCount(); }