public IEntityLock find ( IEntityLock lock ) throws LockingException { IEntityLock foundLock = null ; Map m = getLockCache ( lock . getEntityType ( ) ) ; foundLock = getLockFromCache ( getCacheKey ( lock ) , m ) ; if ( foundLock != null ) { if ( lock . getLockType ( ) != foundLock . getLockType ( ) || ! lock . getExpirationTime ( ) . equals ( foundLock . getExpirationTime ( ) ) ) { foundLock = null ; } } return foundLock ; }
Returns this lock if it exists in the store .