@Override public void startUpdate(UpdateContext op) throws SailException { if (op != null) { flushPendingUpdates(); } synchronized (removed) { assert !removed.containsKey(op); removed.put(op, new LinkedList<Statement>()); } synchronized (added) { assert !added.containsKey(op); added.put(op, new LinkedList<Statement>()); } }
@Override public final void removeStatements(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException { flushPendingUpdates(); removeStatement(null, subj, pred, obj, contexts); }
@Override public final void removeStatements(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException { flushPendingUpdates(); removeStatement(null, subj, pred, obj, contexts); }
@Override public void startUpdate(UpdateContext op) throws SailException { if (op != null) { flushPendingUpdates(); } synchronized (removed) { assert !removed.containsKey(op); removed.put(op, new LinkedList<Statement>()); } synchronized (added) { assert !added.containsKey(op); added.put(op, new LinkedList<Statement>()); } }
@Override public final long size(Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); return sizeInternal(contexts); } finally { connectionLock.readLock().unlock(); } }
@Override public final long size(Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); return sizeInternal(contexts); } finally { connectionLock.readLock().unlock(); } }
@Override public final void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException { if(pendingRemovals()){ flushPendingUpdates(); } addStatement(null, subj, pred, obj, contexts); }
@Override public final void addStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException { if(pendingRemovals()){ flushPendingUpdates(); } addStatement(null, subj, pred, obj, contexts); }
@Override public final CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); return registerIteration(getContextIDsInternal()); } finally { connectionLock.readLock().unlock(); } }
@Override public final CloseableIteration<? extends Resource, SailException> getContextIDs() throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); return registerIteration(getContextIDsInternal()); } finally { connectionLock.readLock().unlock(); } }
@Override public final void clear(Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); updateLock.lock(); try { verifyIsActive(); clearInternal(contexts); } finally { updateLock.unlock(); } } finally { connectionLock.readLock().unlock(); } }
@Override public final void clear(Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); updateLock.lock(); try { verifyIsActive(); clearInternal(contexts); } finally { updateLock.unlock(); } } finally { connectionLock.readLock().unlock(); } }
@Override public final CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); boolean registered = false; CloseableIteration<? extends Statement, SailException> iteration = getStatementsInternal(subj, pred, obj, includeInferred, contexts); try { CloseableIteration<? extends Statement, SailException> registeredIteration = registerIteration( iteration); registered = true; return registeredIteration; } finally { if (!registered) { iteration.close(); } } } finally { connectionLock.readLock().unlock(); } }
@Override public final CloseableIteration<? extends Statement, SailException> getStatements(Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException { flushPendingUpdates(); connectionLock.readLock().lock(); try { verifyIsOpen(); boolean registered = false; CloseableIteration<? extends Statement, SailException> iteration = getStatementsInternal(subj, pred, obj, includeInferred, contexts); try { CloseableIteration<? extends Statement, SailException> registeredIteration = registerIteration( iteration); registered = true; return registeredIteration; } finally { if (!registered) { iteration.close(); } } } finally { connectionLock.readLock().unlock(); } }
throws SailException flushPendingUpdates(); connectionLock.readLock().lock(); try {
throws SailException flushPendingUpdates(); connectionLock.readLock().lock(); try {