question: private void blockIfNecessaryUntilCleaned ( ) throws SpaceCleanedException , InterruptedException { if ( _isCleaned ) { if ( Thread . holdsLock ( _cleanedLock ) ) return ; synchronized ( _cleanedLock ) { long CLEAN_TIMEOUT = 10 * 1000 ; while ( _isCleaned ) { _cleanedLock . wait ( CLEAN_TIMEOUT ) ; if ( _isCleaned ) throw new SpaceCleanedException ( getServiceName ( ) , "Clean operation timed out after " + CLEAN_TIMEOUT + " ms. for space: " + getServiceName ( ) ) ; } } } }
target:  Blocks concurrent calls to Space while clean is being performed. When clean operation will finish, a notifyAll() will be invoked awakening all waiting concurrent operations.