public PartnerLogData findEntry ( RecoveryWrapper rw ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "findEntry" , rw ) ; PartnerLogData entry ; _pltWriteLock . lock ( ) ; try { // Search the partner log table... for ( PartnerLogData pld : _partnerLogTable ) { final RecoveryWrapper nextWrapper = pld . getLogData ( ) ; if ( rw . isSameAs ( nextWrapper ) ) { if ( tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Found entry in table" ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "findEntry" , pld . getIndex ( ) ) ; return pld ; } } // // We have never seen this wrapper before, // so we need to add it to the recoveryTable // entry = rw . container ( _failureScopeController ) ; addPartnerEntry ( entry ) ; } finally { _pltWriteLock . unlock ( ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "findEntry" , entry ) ; return entry ; }
This method searches the partner log table for an entry with matching wrapper . If an entry does not exist one is created and added to the table . It should only be accessing the runtime table .