CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Failed.cc
Go to the documentation of this file.
1 // $Id: Failed.cc,v 1.15.6.1 2011/03/07 11:33:05 mommsen Exp $
3 
10 
11 #include <iostream>
12 
13 using namespace std;
14 using namespace stor;
15 
16 void Failed::do_entryActionWork()
17 {
18  TransitionRecord tr( stateName(), true );
19  outermost_context().updateHistory( tr );
20  outermost_context().setExternallyVisibleState( "Failed" );
21  outermost_context().getNotifier()->reportNewState( "Failed" );
22 
23  // request that the streams that are currently configured in the disk
24  // writer be destroyed (this has the side effect of closing files).
25  // This should have been done by the Halting/Stopping entry actions,
26  // but if we Fail, we need to do it here. No harm if we do it twice.
27  outermost_context().getSharedResources()->
28  diskWriterResources_->requestStreamDestruction();
29 }
30 
31 Failed::Failed( my_context c ): my_base(c)
32 {
34 }
35 
37 {
38  TransitionRecord tr( stateName(), false );
39  outermost_context().updateHistory( tr );
40 
41  outermost_context().getSharedResources()->
42  statisticsReporter_->getStateMachineMonitorCollection().clearStatusMessage();
43 }
44 
46 {
48 }
49 
50 string Failed::do_stateName() const
51 {
52  return std::string( "Failed" );
53 }
54 
56 {
57  // nothing can be done here
58 }
59 
60 
std::string stateName() const
Definition: Operations.cc:39
void safeExitAction()
Definition: Operations.cc:108
virtual std::string do_stateName() const
Definition: Failed.cc:50
virtual ~Failed()
Definition: Failed.cc:45
virtual void do_exitActionWork()
Definition: Failed.cc:36
virtual void do_moveToFailedState(xcept::Exception &exception) const
Definition: Failed.cc:55
void safeEntryAction()
Definition: Operations.cc:77