@Override protected void tearDown() throws Exception { if (dataRep != null) { dataRep.shutDown(); dataRep = null; } }
@Override protected void shutDownInternal() throws RepositoryException { getProxiedRepository().shutDown(); } }
@Override public void shutDown() throws RepositoryException { getDelegate().shutDown(); }
public void shutDown() throws RepositoryException { getDelegate().shutDown(); }
protected void shutDownInternal() throws SailException { try { repository.shutDown(); } catch (RepositoryException e) { throw new SailException(e); } } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ @VisibleForTesting void onPowerOffNotification (final @ListensTo @Nonnull PowerOffNotification notification) throws RepositoryException, IOException, RDFParseException { log.info("onPowerOffNotification({})", notification); if (repository != null) { repository.shutDown(); } }
protected void updateInitializedRepositories() { synchronized (initializedRepositories) { Iterator<Repository> iter = initializedRepositories.values().iterator(); while (iter.hasNext()) { Repository next = iter.next(); if (!next.isInitialized()) { iter.remove(); try { next.shutDown(); } catch(RepositoryException e) { } } } } }
protected void updateInitializedRepositories() { synchronized (initializedRepositories) { Iterator<Repository> iter = initializedRepositories.values().iterator(); while (iter.hasNext()) { Repository next = iter.next(); if (!next.isInitialized()) { iter.remove(); try { next.shutDown(); } catch (RepositoryException e) { } } } } }
void refreshRepository(String repositoryID, Repository repository) { logger.debug("Refreshing repository {}...", repositoryID); try { if (repository.isInitialized()) { repository.shutDown(); } } catch (RepositoryException e) { logger.error("Failed to shut down repository", e); } cleanupIfRemoved(repositoryID); }
void refreshRepository(String repositoryID, Repository repository) { logger.debug("Refreshing repository {}...", repositoryID); try { if (repository.isInitialized()) { repository.shutDown(); } } catch (RepositoryException e) { logger.error("Failed to shut down repository", e); } cleanupIfRemoved(repositoryID); }
/** * Shuts down all initialized repositories, including the SYSTEM repository. * * @see #refresh() */ public void shutDown() { synchronized (initializedRepositories) { updateInitializedRepositories(); for (Repository repository : initializedRepositories.values()) { try { if (repository.isInitialized()) { repository.shutDown(); } } catch (RepositoryException e) { logger.error("Repository shut down failed", e); } } initializedRepositories.clear(); initialized = false; } }
/** * Shuts down all initialized repositories, including the SYSTEM repository. * * @see #refresh() */ public void shutDown() { synchronized (initializedRepositories) { updateInitializedRepositories(); for (Repository repository : initializedRepositories.values()) { try { if (repository.isInitialized()) { repository.shutDown(); } } catch (RepositoryException e) { logger.error("Repository shut down failed", e); } } initializedRepositories.clear(); initialized = false; } }
@Override public void shutDown() throws RepositoryException { boolean denied = false; if (activated) { for (RepositoryInterceptor interceptor : interceptors) { denied = interceptor.shutDown(getDelegate()); if (denied) { break; } } } if (!denied) { getDelegate().shutDown(); } } }
@Override public void shutDown() throws RepositoryException { boolean denied = false; if (activated) { for (RepositoryInterceptor interceptor : interceptors) { denied = interceptor.shutDown(getDelegate()); if (denied) { break; } } } if (!denied) { getDelegate().shutDown(); } } }
@Override public void shutDown() throws RepositoryException { boolean denied = false; if (activated) { for (RepositoryInterceptor interceptor : interceptors) { denied = interceptor.shutDown(getDelegate()); if (denied) { break; } } } if (!denied) { getDelegate().shutDown(); } } }
/** * @throws java.lang.Exception */ @After public void tearDown() throws Exception { logger.debug("tearing down..."); con.close(); con = null; rep.shutDown(); rep = null; logger.debug("tearDown complete."); }
@After public void tearDown() throws Exception { if (testCon2 != null) { testCon2.close(); testCon2 = null; } if (testCon != null) { testCon.close(); testCon = null; } if (testRepository != null) { testRepository.shutDown(); testRepository = null; } vf = null; }
@Test public void testAddStatement() throws Exception { testCon.add(bob, name, nameBob); assertTrue("Repository should contain newly added statement", testCon.hasStatement(bob, name, nameBob, false)); Statement statement = vf.createStatement(alice, name, nameAlice); testCon.add(statement); assertTrue("Repository should contain newly added statement", testCon.hasStatement(statement, false)); assertTrue("Repository should contain newly added statement", testCon.hasStatement(alice, name, nameAlice, false)); Repository tempRep = new SailRepository(new MemoryStore()); tempRep.initialize(); RepositoryConnection con = tempRep.getConnection(); con.add(testCon.getStatements(null, null, null, false)); assertTrue("Temp Repository should contain newly added statement", con.hasStatement(bob, name, nameBob, false)); con.close(); tempRep.shutDown(); }