@Override public Void call() throws Exception { final long begin = System.currentTimeMillis(); BigdataSailRepositoryConnection conn = null; try { conn = getQueryConnection(); // Range count all statements matching that access path. long rangeCount = 0; if (c != null && c.length > 0) { for (Resource r : c) { rangeCount += conn.getTripleStore().getAccessPath(s, p, o, r) .rangeCount(exact); } } else { rangeCount += conn.getTripleStore() .getAccessPath(s, p, o, (Resource) null) .rangeCount(exact); } final long elapsed = System.currentTimeMillis() - begin; buildAndCommitRangeCountResponse(resp, rangeCount, elapsed); return null; } finally { if (conn != null) { conn.close(); } } }
@Override public Void call() throws Exception { final long begin = System.currentTimeMillis(); BigdataSailRepositoryConnection conn = null; try { conn = getQueryConnection(); // Range count all statements matching that access path. long rangeCount = 0; if (c != null && c.length > 0) { for (Resource r : c) { rangeCount += conn.getTripleStore().getAccessPath(s, p, o, r) .rangeCount(exact); } } else { rangeCount += conn.getTripleStore() .getAccessPath(s, p, o, (Resource) null) .rangeCount(exact); } final long elapsed = System.currentTimeMillis() - begin; buildAndCommitRangeCountResponse(resp, rangeCount, elapsed); return null; } finally { if (conn != null) { conn.close(); } } }