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.

105 lines
2.8 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 1992.
  5. //
  6. // File: FRESHLOG.HXX
  7. //
  8. // Contents: Fresh persistent log classes
  9. //
  10. // Classes: CPersRec, CPersStream, SPersStream, CPersFresh, CPersFreshTrans
  11. //
  12. // History: 93-Nov-15 DwightKr Created.
  13. //
  14. //----------------------------------------------------------------------------
  15. #pragma once
  16. #ifdef DISPLAY_INCLUDES
  17. #pragma message( "#include <" __FILE__ ">..." )
  18. #endif
  19. #include <xact.hxx>
  20. #include <pstore.hxx>
  21. class CFreshTable;
  22. class SRcovStorageObj;
  23. class CPartList;
  24. //+-------------------------------------------------------------------------
  25. //
  26. // Class: CPersRec
  27. //
  28. // Synopsis: Records written to CPersLog and CPersSnap objects to track
  29. // changes to the presistent indexes.
  30. //
  31. // History: 93-Nov-15 DwightKr Created
  32. //
  33. //--------------------------------------------------------------------------
  34. #include <pshpack4.h>
  35. class CPersRec
  36. {
  37. public:
  38. CPersRec( WORKID wid, INDEXID iid ) { _wid = wid; _iid = iid; }
  39. WORKID GetWorkID() { return _wid; }
  40. INDEXID GetIndexID() { return _iid; }
  41. private:
  42. WORKID _wid; // WorkID in record
  43. INDEXID _iid; // IndexID in record
  44. };
  45. #include <poppack.h>
  46. //+-------------------------------------------------------------------------
  47. //
  48. // Class: CPersFresh
  49. //
  50. // Synopsis: Keeps track of the persistant log in the freshlist
  51. //
  52. // History: 93-Nov-15 DwightKr Created
  53. // 94-Sep-07 Srikants Modified Load and ctor
  54. //
  55. //--------------------------------------------------------------------------
  56. class CIdxSubstitution;
  57. class CPersFresh
  58. {
  59. public:
  60. inline CPersFresh( PStorage & storage, CPartList & partList );
  61. ULONG GetPersRecCount();
  62. void LokEmpty();
  63. void LoadFreshTest( CFreshTable & freshTable );
  64. void LokCompactLog( SRcovStorageObj & persFreshLog,
  65. CFreshTableIter & iter,
  66. CIdxSubstitution& subst);
  67. private:
  68. PStorage & _storage; // Storage containing CPersFresh
  69. CPartList & _partList;
  70. };
  71. //+---------------------------------------------------------------------------
  72. //
  73. // Member: CPersFresh::CPersFresh, public
  74. //
  75. // Synopsis: Constructor.
  76. //
  77. // Arguments: [storage] -- storage containing this CPersFresh
  78. //
  79. // History: 93-Nov-15 DwightKr Created.
  80. //
  81. //----------------------------------------------------------------------------
  82. CPersFresh::CPersFresh( PStorage & storage, CPartList & partList )
  83. : _storage(storage), _partList(partList)
  84. {
  85. }