Source code of Windows XP (NT5)
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.

162 lines
3.6 KiB

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