/** * 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(); } }
/** * Destroy the configured namespace. * * @throws SailException * @throws ExecutionException * @throws InterruptedException * * @see Options#NAMESPACE * * @see BLZG-2041 (BigdataSail should not locate the AbstractTripleStore until a connection is requested) */ public void destroy() throws SailException, InterruptedException, ExecutionException { shutDown(); AbstractApiTask.submitApiTask(indexManager, new DestroyKBTask(namespace) ).get(); }
@Override public void destroy() throws Exception { if (sail.isOpen()) { sail.shutDown(); } if (sail instanceof BigdataSail) { ((BigdataSail) sail).__tearDownUnitTest(); } }
/** * Destroy the configured namespace. * * @throws SailException * @throws ExecutionException * @throws InterruptedException * * @see Options#NAMESPACE * * @see BLZG-2041 (BigdataSail should not locate the AbstractTripleStore until a connection is requested) */ public void destroy() throws SailException, InterruptedException, ExecutionException { shutDown(); AbstractApiTask.submitApiTask(indexManager, new DestroyKBTask(namespace) ).get(); }
/** * <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); }
/** * Test creates a database, obtains a writable connection on the database, * and then closes the connection and shutdown the database. * * @throws SailException */ public void test_getConnection() throws SailException { final Properties properties = new Properties(); properties.setProperty(Options.CREATE_TEMP_FILE, "true"); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); final SailConnection conn = sail.getConnection(); conn.close(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }
/** * Test creates a database, obtains a writable connection on the database, * and then closes the connection and shutdown the database. * * @throws SailException */ public void test_getConnection() throws SailException { final Properties properties = new Properties(); properties.setProperty(Options.CREATE_TEMP_FILE, "true"); final BigdataSail sail = new BigdataSail(properties); try { sail.initialize(); final SailConnection conn = sail.getConnection(); conn.close(); sail.shutDown(); } finally { sail.getIndexManager().destroy(); } }