Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
3.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CClusNetCleanup.cpp
  7. //
  8. // Description:
  9. // Contains the definition of the CClusNetCleanup class.
  10. //
  11. // Maintained By:
  12. // David Potter (DavidP) 15-JUN-2001
  13. // Vij Vasu (Vvasu) 01-MAY-2000
  14. //
  15. //////////////////////////////////////////////////////////////////////////////
  16. //////////////////////////////////////////////////////////////////////////////
  17. // Include Files
  18. //////////////////////////////////////////////////////////////////////////////
  19. // The precompiled header.
  20. #include "Pch.h"
  21. // The header for this file
  22. #include "CClusNetCleanup.h"
  23. // For the CBaseClusterCleanup class.
  24. #include "CBaseClusterCleanup.h"
  25. //////////////////////////////////////////////////////////////////////////////
  26. //++
  27. //
  28. // CClusNetCleanup::CClusNetCleanup
  29. //
  30. // Description:
  31. // Constructor of the CClusNetCleanup class
  32. //
  33. // Arguments:
  34. // pbccParentActionIn
  35. // Pointer to the base cluster action of which this action is a part.
  36. //
  37. // Return Value:
  38. // None.
  39. //
  40. // Exceptions Thrown:
  41. // Any exceptions thrown by underlying functions
  42. //
  43. //--
  44. //////////////////////////////////////////////////////////////////////////////
  45. CClusNetCleanup::CClusNetCleanup( CBaseClusterCleanup * pbccParentActionIn )
  46. : BaseClass( pbccParentActionIn )
  47. {
  48. TraceFunc( "" );
  49. // It is currently not possible to rollback a cleanup.
  50. SetRollbackPossible( false );
  51. TraceFuncExit();
  52. } //*** CClusNetCleanup::CClusNetCleanup
  53. //////////////////////////////////////////////////////////////////////////////
  54. //++
  55. //
  56. // CClusNetCleanup::~CClusNetCleanup
  57. //
  58. // Description:
  59. // Destructor of the CClusNetCleanup class.
  60. //
  61. // Arguments:
  62. // None.
  63. //
  64. // Return Value:
  65. // None.
  66. //
  67. // Exceptions Thrown:
  68. // Any exceptions thrown by underlying functions
  69. //
  70. //--
  71. //////////////////////////////////////////////////////////////////////////////
  72. CClusNetCleanup::~CClusNetCleanup( void )
  73. {
  74. TraceFunc( "" );
  75. TraceFuncExit();
  76. } //*** CClusNetCleanup::~CClusNetCleanup
  77. //////////////////////////////////////////////////////////////////////////////
  78. //++
  79. //
  80. // CClusNetCleanup::Commit
  81. //
  82. // Description:
  83. // Clean up the service.
  84. //
  85. // Arguments:
  86. // None.
  87. //
  88. // Return Value:
  89. // None.
  90. //
  91. // Exceptions Thrown:
  92. // Any that are thrown by the contained actions.
  93. //
  94. //--
  95. //////////////////////////////////////////////////////////////////////////////
  96. void
  97. CClusNetCleanup::Commit( void )
  98. {
  99. TraceFunc( "" );
  100. // Call the base class commit method.
  101. BaseClass::Commit();
  102. // Cleanup the ClusNet service.
  103. CleanupService();
  104. // If we are here, then everything went well.
  105. SetCommitCompleted( true );
  106. TraceFuncExit();
  107. } //*** CClusNetCleanup::Commit()
  108. //////////////////////////////////////////////////////////////////////////////
  109. //++
  110. //
  111. // CClusNetCleanup::Rollback
  112. //
  113. // Description:
  114. // Rollback the cleanup the service. This is currently not supported.
  115. //
  116. // Arguments:
  117. // None.
  118. //
  119. // Return Value:
  120. // None.
  121. //
  122. // Exceptions Thrown:
  123. // Any that are thrown by the underlying functions.
  124. //
  125. //--
  126. //////////////////////////////////////////////////////////////////////////////
  127. void
  128. CClusNetCleanup::Rollback( void )
  129. {
  130. TraceFunc( "" );
  131. // Call the base class rollback method. This will throw an exception since
  132. // SetRollbackPossible( false ) was called in the constructor.
  133. BaseClass::Rollback();
  134. SetCommitCompleted( false );
  135. TraceFuncExit();
  136. } //*** CClusNetCleanup::Rollback