[rhmessaging-commits] rhmessaging commits: r3067 - in store/trunk/cpp: tests/jrnl and 1 other directory.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jan 22 15:06:04 EST 2009


Author: kpvdr
Date: 2009-01-22 15:06:04 -0500 (Thu, 22 Jan 2009)
New Revision: 3067

Modified:
   store/trunk/cpp/lib/jrnl/jcntl.cpp
   store/trunk/cpp/lib/jrnl/jinf.cpp
   store/trunk/cpp/lib/jrnl/jinf.hpp
   store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
Log:
More preparation for auto-expand: Class jinf var renames.

Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp	2009-01-22 16:41:49 UTC (rev 3066)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp	2009-01-22 20:06:04 UTC (rev 3067)
@@ -592,12 +592,12 @@
 
     try
     {
-        rd._ffid = ji.get_first_fid();
-        rd._lfid = ji.get_last_fid();
+        rd._ffid = ji.get_first_pfid();
+        rd._lfid = ji.get_last_pfid();
         rd._owi = ji.get_initial_owi();
         rd._frot = ji.get_frot();
         rd._jempty = false;
-        ji.get_normalized_fid_list(rd._fid_list);
+        ji.get_normalized_pfid_list(rd._fid_list); // _pfid_list
     }
     catch (const jexception& e)
     {

Modified: store/trunk/cpp/lib/jrnl/jinf.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.cpp	2009-01-22 16:41:49 UTC (rev 3066)
+++ store/trunk/cpp/lib/jrnl/jinf.cpp	2009-01-22 20:06:04 UTC (rev 3067)
@@ -207,9 +207,9 @@
     // If this is not the first rotation, all files should be in either early or late maps
     if (!_frot) assert(early_map.size() + late_map.size() == _num_jfiles);
 
-    _fidl.clear();
-    late_map.get_pfid_list(_fidl);
-    early_map.get_pfid_list(_fidl);
+    _pfid_list.clear();
+    late_map.get_pfid_list(_pfid_list);
+    early_map.get_pfid_list(_pfid_list);
     _analyzed_flag = true;
 }
 
@@ -234,44 +234,44 @@
 }
 
 u_int16_t
-jinf::get_first_fid()
+jinf::get_first_pfid()
 {
     if (!_analyzed_flag)
         analyze();
-    return *_fidl.begin();
+    return *_pfid_list.begin();
 }
 
 u_int16_t
-jinf::get_last_fid()
+jinf::get_last_pfid()
 {
     if (!_analyzed_flag)
         analyze();
-    return *_fidl.rbegin();
+    return *_pfid_list.rbegin();
 }
 
-jinf::fid_list&
-jinf::get_fid_list()
+jinf::pfid_list&
+jinf::get_pfid_list()
 {
     if (!_analyzed_flag)
         analyze();
-    return _fidl;
+    return _pfid_list;
 }
 
 void
-jinf::get_normalized_fid_list(fid_list& fidl)
+jinf::get_normalized_pfid_list(pfid_list& pfid_list)
 {
     if (!_analyzed_flag)
         analyze();
-    fidl.clear();
-    u_int16_t s = _fidl.size();
+    pfid_list.clear();
+    u_int16_t s = _pfid_list.size();
     u_int16_t iz = 0; // index of 0 value
-    while (_fidl[iz] && iz < s)
+    while (_pfid_list[iz] && iz < s)
         iz++;
-    assert(_fidl[iz] == 0);
+    assert(_pfid_list[iz] == 0);
     for (u_int16_t i = iz; i < iz + s; i++)
-        fidl.push_back(_fidl[i % s]);
-    assert(fidl[0] == 0);
-    assert(fidl.size() == s);
+        pfid_list.push_back(_pfid_list[i % s]);
+    assert(pfid_list[0] == 0);
+    assert(pfid_list.size() == s);
 }
 
 bool

Modified: store/trunk/cpp/lib/jrnl/jinf.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.hpp	2009-01-22 16:41:49 UTC (rev 3066)
+++ store/trunk/cpp/lib/jrnl/jinf.hpp	2009-01-22 20:06:04 UTC (rev 3067)
@@ -48,8 +48,8 @@
     class jinf
     {
     public:
-        typedef std::vector<u_int16_t> fid_list; // pfids
-        typedef fid_list::const_iterator fidl_citr;
+        typedef std::vector<u_int16_t> pfid_list; // pfids
+        typedef pfid_list::const_iterator pfidl_citr;
 
     private:
         u_int8_t _jver;
@@ -70,7 +70,7 @@
         std::tm* _tm_ptr;
         bool _valid_flag;
         bool _analyzed_flag;
-        fid_list _fidl;
+        pfid_list _pfid_list;
         bool _initial_owi;
         bool _frot;
 
@@ -105,10 +105,10 @@
         inline u_int16_t wcache_num_pages() const { return _wcache_num_pages; }
         inline u_int32_t rcache_pgsize_sblks() const { return _rcache_pgsize_sblks; }
         inline u_int16_t rcache_num_pages() const { return _rcache_num_pages; }
-        u_int16_t get_first_fid();
-        u_int16_t get_last_fid();
-        fid_list& get_fid_list();
-        void get_normalized_fid_list(fid_list& fidl);
+        u_int16_t get_first_pfid();
+        u_int16_t get_last_pfid();
+        pfid_list& get_pfid_list();
+        void get_normalized_pfid_list(pfid_list& pfid_list);
         bool get_initial_owi();
         bool get_frot();
 

Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp	2009-01-22 16:41:49 UTC (rev 3066)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp	2009-01-22 20:06:04 UTC (rev 3067)
@@ -292,10 +292,10 @@
         */
         void check_analysis(jinf& ji)   // jinf object under test after analyze() has been called
         {
-            BOOST_CHECK_EQUAL(ji.get_first_fid(), get_first_pfid());
-            BOOST_CHECK_EQUAL(ji.get_last_fid(), get_last_pfid());
+            BOOST_CHECK_EQUAL(ji.get_first_pfid(), get_first_pfid());
+            BOOST_CHECK_EQUAL(ji.get_last_pfid(), get_last_pfid());
 
-            jinf::fid_list& pfidl = ji.get_fid_list();
+            jinf::pfid_list& pfidl = ji.get_pfid_list();
             const u_int16_t num_jfiles = _map.size();
             const bool all_used = _num_used_files == num_jfiles;
             BOOST_CHECK_EQUAL(pfidl.size(), _num_used_files);




More information about the rhmessaging-commits mailing list