@Override public void endUpdate() { synchronized (this) { if ( inUpdate == 0 ) error(EndUpdate, "endUpdate but not in update") ; if ( inRead > 0 ) error(EndUpdate, "endUpdate when in read") ; checkEmpty("Outstanding read blocks at end of update operations", activeReadBlocks) ; checkEmpty("Outstanding write blocks at end of update operations", activeWriteBlocks) ; inUpdate-- ; clearBlockTracking() ; } blockMgr.endUpdate() ; }
@Override public void endUpdate() { synchronized (this) { if ( inUpdate == 0 ) error(EndUpdate, "endUpdate but not in update") ; if ( inRead > 0 ) error(EndUpdate, "endUpdate when in read") ; checkEmpty("Outstanding read blocks at end of update operations", activeReadBlocks) ; checkEmpty("Outstanding write blocks at end of update operations", activeWriteBlocks) ; inUpdate-- ; clearBlockTracking() ; } blockMgr.endUpdate() ; }
@Override synchronized public void endRead() { synchronized (this) { if ( inRead == 0 ) error(EndRead, "endRead but not in read") ; if ( inUpdate != 0 ) error(EndRead, "endRead when in update") ; checkEmpty("Outstanding write blocks at end of read operations!", activeWriteBlocks) ; if ( inRead == 0 ) { // Check at end of multiple reads or a write checkEmpty("Outstanding read blocks at end of read operations", activeReadBlocks) ; clearBlockTracking() ; } inRead-- ; } blockMgr.endRead() ; }
@Override synchronized public void endRead() { synchronized (this) { if ( inRead == 0 ) error(EndRead, "endRead but not in read") ; if ( inUpdate != 0 ) error(EndRead, "endRead when in update") ; checkEmpty("Outstanding write blocks at end of read operations!", activeWriteBlocks) ; if ( inRead == 0 ) { // Check at end of multiple reads or a write checkEmpty("Outstanding read blocks at end of read operations", activeReadBlocks) ; clearBlockTracking() ; } inRead-- ; } blockMgr.endRead() ; }