public void directTermination(FailureScope failureScope) throws TerminationFailedException {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "directTermination", new Object[] { failureScope, this });

        Tr.info(tc, "CWRLS0014_HALT_PEER_RECOVERY", failureScope.serverName());

        // If callbacks are registered, drive then now.
        if (_registeredCallbacks != null) {
            driveCallBacks(CALLBACK_TERMINATIONSTARTED, failureScope);
        }

        if (Configuration.HAEnabled()) {
            Configuration.getRecoveryLogComponent().leaveCluster(failureScope);
        }

        // Extract the 'values' collection from the _registeredRecoveryAgents map and create an iterator
        // from it. This iterator will return ArrayList objects each containing a set of RecoveryAgent
        // objects. Each ArrayList corrisponds to a different sequence priority value.
        final Collection registeredRecoveryAgentsValues = _registeredRecoveryAgents.values();
        final Iterator registeredRecoveryAgentsValuesIterator = registeredRecoveryAgentsValues.iterator();

        while (registeredRecoveryAgentsValuesIterator.hasNext()) {
            // Extract the next ArrayList and create an iterator from it. This iterator will return RecoveryAgent
            // objects that are registered at the same sequence priority value.
            final ArrayList registeredRecoveryAgentsArray = (java.util.ArrayList) registeredRecoveryAgentsValuesIterator.next();
            final Iterator registeredRecoveryAgentsArrayIterator = registeredRecoveryAgentsArray.iterator();

            while (registeredRecoveryAgentsArrayIterator.hasNext()) {
                // Extract the next RecoveryAgent object
                final RecoveryAgent recoveryAgent = (RecoveryAgent) registeredRecoveryAgentsArrayIterator.next();

                // Record the fact that we have an outstanding termination request for the RecoveryAgent.
                addTerminationRecord(recoveryAgent, failureScope);

                // Direct the RecoveryAgent instance to terminate processing of this failure scope
                try {
                    recoveryAgent.terminateRecovery(failureScope);
                } catch (TerminationFailedException exc) {
                    FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination", "540", this);
                    if (tc.isEntryEnabled())
                        Tr.exit(tc, "directTermination", exc);
                    throw exc;
                } catch (Exception exc) {
                    FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination", "576", this);
                    if (tc.isEntryEnabled())
                        Tr.exit(tc, "directTermination", exc);
                    throw new TerminationFailedException(exc);
                }

                // Wait for 'terminationComplete' to be called. This callback may be issued from another thread.
                synchronized (_outstandingTerminationRecords) {
                    while (terminationOutstanding(recoveryAgent, failureScope)) {
                        try {
                            _outstandingTerminationRecords.wait();
                        } catch (InterruptedException exc) {
                            // This exception is recieved if another thread interrupts this thread by calling this threads
                            // Thread.interrupt method. The RecoveryDirectorImpl class does not use this mechanism for
                            // breaking out of the wait call - it uses notifyAll to wake up all waiting threads. This
                            // exception should never be generated. If for some reason it is called then ignore it and
                            //start to wait again.
                            FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination", "549", this);
                        }
                    }
                }
            }
        }

        // If callbacks are registered, drive then now.
        if (_registeredCallbacks != null) {
            driveCallBacks(CALLBACK_TERMINATIONCOMPLETE, failureScope);
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "directTermination");
    }
public void directTermination ( FailureScope failureScope ) throws TerminationFailedException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "directTermination" , new Object [ ] { failureScope , this } ) ; Tr . info ( tc , "CWRLS0014_HALT_PEER_RECOVERY" , failureScope . serverName ( ) ) ; if ( _registeredCallbacks != null ) { driveCallBacks ( CALLBACK_TERMINATIONSTARTED , failureScope ) ; } if ( Configuration . HAEnabled ( ) ) { Configuration . getRecoveryLogComponent ( ) . leaveCluster ( failureScope ) ; } final Collection registeredRecoveryAgentsValues = _registeredRecoveryAgents . values ( ) ; final Iterator registeredRecoveryAgentsValuesIterator = registeredRecoveryAgentsValues . iterator ( ) ; while ( registeredRecoveryAgentsValuesIterator . hasNext ( ) ) { final ArrayList registeredRecoveryAgentsArray = ( java . util . ArrayList ) registeredRecoveryAgentsValuesIterator . next ( ) ; final Iterator registeredRecoveryAgentsArrayIterator = registeredRecoveryAgentsArray . iterator ( ) ; while ( registeredRecoveryAgentsArrayIterator . hasNext ( ) ) { final RecoveryAgent recoveryAgent = ( RecoveryAgent ) registeredRecoveryAgentsArrayIterator . next ( ) ; addTerminationRecord ( recoveryAgent , failureScope ) ; try { recoveryAgent . terminateRecovery ( failureScope ) ; } catch ( TerminationFailedException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination" , "540" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "directTermination" , exc ) ; throw exc ; } catch ( Exception exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination" , "576" , this ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "directTermination" , exc ) ; throw new TerminationFailedException ( exc ) ; } synchronized ( _outstandingTerminationRecords ) { while ( terminationOutstanding ( recoveryAgent , failureScope ) ) { try { _outstandingTerminationRecords . wait ( ) ; } catch ( InterruptedException exc ) { FFDCFilter . processException ( exc , "com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl.directTermination" , "549" , this ) ; } } } } } if ( _registeredCallbacks != null ) { driveCallBacks ( CALLBACK_TERMINATIONCOMPLETE , failureScope ) ; } if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "directTermination" ) ; }
Internal method to terminate recovery processing of the given FailureScope. All
registered RecoveryAgent objects will be directed to terminate processing of the
FailureScopein sequence.

@param FailureScope The FailureScope to process.