public synchronized boolean removeLock ( Object bookmark , SessionInfo sessionInfo ) { Utility . getLogger ( ) . info ( "Unlock: " + bookmark + ", Session: " + sessionInfo . m_iSessionID + " success: " + sessionInfo . equals ( this . get ( bookmark ) ) ) ; if ( ! sessionInfo . equals ( this . get ( bookmark ) ) ) return false ; // Not my session - error. if ( this . getWaitlist ( bookmark , false ) != null ) if ( this . getWaitlist ( bookmark , false ) . size ( ) > 0 ) { // Notify this person that the wait is over SessionInfo sessionInfoToUnlock = this . getWaitlist ( bookmark , true ) . get ( 0 ) ; if ( sessionInfoToUnlock == null ) return false ; // Never synchronized ( sessionInfoToUnlock ) { if ( sessionInfoToUnlock != this . popWaitlistSession ( bookmark ) ) return false ; // Never since the only remove is this (synchronized line) boolean bSuccess = sessionInfo . equals ( this . remove ( bookmark ) ) ; if ( bSuccess ) // Always sessionInfoToUnlock . notify ( ) ; // Tell locked session to continue return bSuccess ; } } return sessionInfo . equals ( this . remove ( bookmark ) ) ; }
Remove this bookmark from the lock list .