Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions

void Kernel_Administration::Shutdown ( tgg00_TransContext &  trans  )  [private, virtual]

After calling the kernel is offline. If the autosave log is in standby an error is set.

Implements Kernel_IAdminRestartShutdown.

Definition at line 415 of file Kernel_Administration.cpp.

References Kernel_StateScope::EnterCriticalState(), Kernel_State::IsOnline(), m_State, Offline(), and Log_Savepoint::StartSavepointAndWait().

{
    SAPDBTRACE_METHOD_DEBUG ("Kernel_Administration::Shutdown", Common_Trace, 5);
    
    if ( ! m_State.IsOnline()  )
    {
        trans.trError_gg00 = e_dbm_command_not_possible;
        return;
    }

    // PTS 1128407 UH 2004-03-10 added synchronization for multiple shutdown requests
    Kernel_StateScope stateRedo (Kernel_State::criticalStateRedo, m_State);
    if ( ! stateRedo.EnterCriticalState() )
        // more then one shutdown request occured but no error is wanted
        return;

    const tgg00_BasisError auxError = trans.trError_gg00;
    trans.trError_gg00 = e_ok;

    /* PTS 1128407 UH 2004-03-10 do not check autosave here
       it is disabled by Log_Savepoint::Coordinator()
    if ( k38is_on_autosave (trans, false) )
    {
        trans.trError_gg00 = e_autosave_running;
        return;
    }
    trans.trError_gg00 = e_ok;
    */

    Log_SavepointManager.StartSavepointAndWait (trans, Log_SVPReasonShutdown);
    // it should not be possible to reach this code
    Offline (auxError);
}


Generated by  Doxygen 1.6.0   Back to index