@Override public void shutdown() { try { try { if (autocommitOnShutdown) { /* * Auto-commit on close. */ commit(); } } finally { repo.shutDown(); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(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); } }
@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); } }
public void testBufferCapacity() throws Exception { final BigdataSail sail = getSail(); final BigdataSailRepository repo = new BigdataSailRepository(sail); repo.initialize(); try { // This configuration exceeds StatementBuffer capacity executeQuery(repo, Integer.valueOf(BigdataSail.Options.DEFAULT_BUFFER_CAPACITY) * 5, 1); } finally { repo.shutDown(); sail.__tearDownUnitTest(); } }
public void testMergeUtility() throws Exception { final BigdataSail sail = getSail(); final BigdataSailRepository repo = new BigdataSailRepository(sail); repo.initialize(); try { // This configuration uses MergeUtility, ensuring its capacity is sufficient executeQuery(repo, 35000, 7000); } finally { repo.shutDown(); sail.__tearDownUnitTest(); } }
private void executeQuery(final BigdataSailRepository repo) throws UpdateExecutionException, RepositoryException, MalformedQueryException { try { repo.initialize(); final BigdataSailRepositoryConnection conn = repo.getConnection(); try { String update = "insert {" + "<http://dbpedia.org/resource/Jules_Verne> <http://dbpedia.org/property/period> \"\"^^<http://www.w3.org/2001/XMLSchema#int>\r\n" + "} where {}"; Update preparedUpdate = conn.prepareUpdate(QueryLanguage.SPARQL, update); preparedUpdate.execute(); // no exception should occur on execution, overwise test will fail } finally { conn.close(); } } finally { repo.shutDown(); } }
public void testBufferCapacity() throws Exception { final BigdataSail sail = getSail(); final BigdataSailRepository repo = new BigdataSailRepository(sail); repo.initialize(); try { // This configuration exceeds StatementBuffer capacity executeQuery(repo, Integer.valueOf(BigdataSail.Options.DEFAULT_BUFFER_CAPACITY) * 5, 1); } finally { repo.shutDown(); sail.__tearDownUnitTest(); } }
public void testMergeUtility() throws Exception { final BigdataSail sail = getSail(); final BigdataSailRepository repo = new BigdataSailRepository(sail); repo.initialize(); try { // This configuration uses MergeUtility, ensuring its capacity is sufficient executeQuery(repo, 35000, 7000); } finally { repo.shutDown(); sail.__tearDownUnitTest(); } }
private void executeQuery(final BigdataSailRepository repo) throws UpdateExecutionException, RepositoryException, MalformedQueryException { try { repo.initialize(); final BigdataSailRepositoryConnection conn = repo.getConnection(); try { String update = "insert {" + "<http://dbpedia.org/resource/Jules_Verne> <http://dbpedia.org/property/period> \"\"^^<http://www.w3.org/2001/XMLSchema#int>\r\n" + "} where {}"; Update preparedUpdate = conn.prepareUpdate(QueryLanguage.SPARQL, update); preparedUpdate.execute(); // no exception should occur on execution, overwise test will fail } finally { conn.close(); } } finally { repo.shutDown(); } }