private void addTerminationRecord(RecoveryAgent recoveryAgent, FailureScope failureScope) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "addTerminationRecord", new Object[] { recoveryAgent, failureScope, this });

        synchronized (_outstandingTerminationRecords) {
            // Extract the set of failure scopes that the corrisponding client service is currently
            // processing
            HashSet<FailureScope> failureScopeSet = _outstandingTerminationRecords.get(recoveryAgent);

            // If its not handled yet any then create an empty set to hold both this and future
            // failure scopes.
            if (failureScopeSet == null) {
                failureScopeSet = new HashSet<FailureScope>();
                _outstandingTerminationRecords.put(recoveryAgent, failureScopeSet);
            }

            // Add this new failure scope to the set of those currently being processed by the
            // client service.
            failureScopeSet.add(failureScope);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "addTerminationRecord");
    }
private void addTerminationRecord ( RecoveryAgent recoveryAgent , FailureScope failureScope ) { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "addTerminationRecord" , new Object [ ] { recoveryAgent , failureScope , this } ) ; synchronized ( _outstandingTerminationRecords ) { HashSet < FailureScope > failureScopeSet = _outstandingTerminationRecords . get ( recoveryAgent ) ; if ( failureScopeSet == null ) { failureScopeSet = new HashSet < FailureScope > ( ) ; _outstandingTerminationRecords . put ( recoveryAgent , failureScopeSet ) ; } failureScopeSet . add ( failureScope ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "addTerminationRecord" ) ; }
<p>
Internal method to record a termination request for the supplied RecoveryAgent
and FailureScope combination.
</p>

<p>
Just prior to requesting a RecoveryAgent to "terminateRecovery" of a
FailureScope, this method is driven to record the request. When the client
service is ready and invokes RecoveryDirector.terminateComplete,
the removeTerminationRecord method is called to remove this record.
</p>

@param recoveryAgent The RecoveryAgent that is about to be directed to terminate
recovery of a FailureScope.
@param failureScope The FailureScope.