@ Override public void close ( ) { for ( Map . Entry < ORID , LockedRecordMetadata > lock : locks . entrySet ( ) ) { try { final LockedRecordMetadata lockedRecordMetadata = lock . getValue ( ) ; if ( lockedRecordMetadata . strategy . equals ( OStorage . LOCKING_STRATEGY . EXCLUSIVE_LOCK ) ) { ( ( OAbstractPaginatedStorage ) getDatabase ( ) . getStorage ( ) . getUnderlying ( ) ) . releaseWriteLock ( lock . getKey ( ) ) ; } else if ( lockedRecordMetadata . strategy . equals ( OStorage . LOCKING_STRATEGY . SHARED_LOCK ) ) { ( ( OAbstractPaginatedStorage ) getDatabase ( ) . getStorage ( ) . getUnderlying ( ) ) . releaseReadLock ( lock . getKey ( ) ) ; } } catch ( Exception e ) { OLogManager . instance ( ) . debug ( this , "Error on releasing lock against record " + lock . getKey ( ) , e ) ; } } locks . clear ( ) ; }
Closes the transaction and releases all the acquired locks .