private final void notifyDelete(Node g, Node s, Node p, Node o) { if ( monitor == null ) return ; QuadAction action = QuadAction.DELETE ; if ( checkForChange ) { if ( ! contains(g,s,p,o) ) action = QuadAction.NO_DELETE ; } monitor.change(action, g, s, p, o); }
@Override public void commit() { super.getMonitor().finish() ; commitAction.run(); readWriteMode.set(null); }
@Override public void begin(ReadWrite readWrite) { // Do not synchronized(txnLock) here. It will deadlock because if there // is an writer in commit, it can't // The "super.begin" is enough. readWriteMode.set(readWrite); super.begin(readWrite) ; super.getMonitor().start() ; }
@Override public void begin(ReadWrite readWrite) { // Do not synchronized(txnLock) here. It will deadlock because if there // is an writer in commit, it can't // The "super.begin" is enough. readWriteMode.set(readWrite); super.begin(readWrite) ; super.getMonitor().start() ; }
/** * Rollback all changes, discarding any exceptions that occur. */ @Override public void abort() { super.getMonitor().finish() ; abortAction.run(); readWriteMode.set(null); }
@Override public void begin(ReadWrite readWrite) { super.begin(readWrite) ; //textIndex.begin(readWrite) ; if ( readWrite == ReadWrite.WRITE ) { // WRONG design super.getMonitor().start() ; // Right design. //textIndex.startIndexing() ; needFinish = true ; } }
private final void notifyAdd(Node g, Node s, Node p, Node o) { if ( monitor == null ) return ; QuadAction action = QuadAction.ADD ; if ( checkForChange ) { if ( contains(g,s,p,o) ) action = QuadAction.NO_ADD ; } monitor.change(action, g, s, p, o); }
@Override public void commit() { super.getMonitor().finish() ; commitAction.run(); readWriteMode.set(null); }
@Override public void begin(ReadWrite readWrite) { super.begin(readWrite) ; //textIndex.begin(readWrite) ; if ( readWrite == ReadWrite.WRITE ) { // WRONG design super.getMonitor().start() ; // Right design. //textIndex.startIndexing() ; needFinish = true ; } }
private void record(QuadAction action, Node g, Node s, Node p, Node o) { monitor.change(action, g, s, p, o) ; }
/** * Rollback all changes, discarding any exceptions that occur. */ @Override public void abort() { super.getMonitor().finish() ; abortAction.run(); readWriteMode.set(null); }
@Override public void commit() { try { if ( needFinish ) { super.getMonitor().finish() ; //spatialIndex.finishIndexing() ; } needFinish = false ; //spatialIndex.commit() ; super.commit() ; } catch (Throwable ex) { log.warn("Exception in commit: "+ex.getMessage(), ex) ; super.abort() ; } }
@Override public void end() { if ( ! isInTransaction() ) { super.end() ; return; } if (readWriteMode.get() == ReadWrite.WRITE) { // If we are still in a write transaction at this point, then commit // was never called, so rollback the TextIndex and the dataset. abortAction.run(); } super.end() ; super.getMonitor().finish() ; readWriteMode.set(null) ; }
@Override public void commit() { try { if ( needFinish ) { super.getMonitor().finish() ; //spatialIndex.finishIndexing() ; } needFinish = false ; //spatialIndex.commit() ; super.commit() ; } catch (Throwable ex) { log.warn("Exception in commit: "+ex.getMessage(), ex) ; super.abort() ; } }
@Override public void end() { if ( ! isInTransaction() ) { super.end() ; return; } if (readWriteMode.get() == ReadWrite.WRITE) { // If we are still in a write transaction at this point, then commit // was never called, so rollback the TextIndex and the dataset. abortAction.run(); } super.end() ; super.getMonitor().finish() ; readWriteMode.set(null) ; }
private void commit_W() { synchronized(txnExitLock) { super.getMonitor().finish() ;
private void commit_W() { synchronized(txnExitLock) { super.getMonitor().finish() ;