private boolean tryLock ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "tryLock" , this ) ; boolean result = false ; synchronized ( iMutex ) { // Check that we aren't exclusively locked. if ( ! iExclusivelyLocked || iExclusiveLockHolder == Thread . currentThread ( ) ) { incrementThreadLockCount ( ) ; result = true ; } } if ( tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "tryLock" , new Boolean ( result ) ) ; return result ; }
This method increments a the number of locks that have been obtained .