[rhmessaging-commits] rhmessaging commits: r3079 - store/trunk/cpp/lib/jrnl.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Jan 29 11:29:19 EST 2009


Author: kpvdr
Date: 2009-01-29 11:29:19 -0500 (Thu, 29 Jan 2009)
New Revision: 3079

Modified:
   store/trunk/cpp/lib/jrnl/jcntl.hpp
Log:
Fixed some selling errors and typos in comments in jcntl.hpp

Modified: store/trunk/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.hpp	2009-01-28 17:58:51 UTC (rev 3078)
+++ store/trunk/cpp/lib/jrnl/jcntl.hpp	2009-01-29 16:29:19 UTC (rev 3079)
@@ -70,12 +70,12 @@
         /**
         * \brief Journal ID
         *
-        * This string uniquly identifies this journal instance. It will most likely be associated
+        * This string uniquely identifies this journal instance. It will most likely be associated
         * with the identity of the message queue with which it is associated.
         */
         // TODO: This is not included in any files at present, add to file_hdr?
         std::string _jid;
-        
+
         /**
         * \brief Journal directory
         *
@@ -98,7 +98,7 @@
         /**
         * \brief Initialized flag
         *
-        * This flag starts out set to false, is set to true once this object has been initilaized,
+        * This flag starts out set to false, is set to true once this object has been initialized,
         * either by calling initialize() or recover().
         */
         bool _init_flag;
@@ -117,9 +117,9 @@
 
         /**
         * \brief Read-only state flag used during recover.
-        * 
+        *
         * When true, this flag prevents journal write operations (enqueue and dequeue), but
-        * allows read to occur. It is used durning recovery, and is reset when recovered() is
+        * allows read to occur. It is used during recovery, and is reset when recovered() is
         * called.
         */
         bool _readonly_flag;
@@ -160,7 +160,7 @@
         * \brief Destructor.
         */
         virtual ~jcntl();
-         
+
         inline const std::string& id() const { return _jid; }
         inline const std::string& jrnl_dir() const { return _jdir.dirname(); }
 
@@ -187,7 +187,7 @@
         *     maximum total number of files allowed in the journal (original plus those added by auto-expand mode). If
         *     this number of files exist and the journal runs out of space, an exception will be thrown. This number
         *     must be greater than the num_jfiles parameter value but cannot exceed the maximum number of files for a
-        *     single journal; if num_jfiles is already at its maximum value, then auto-expand wil be disabled.
+        *     single journal; if num_jfiles is already at its maximum value, then auto-expand will be disabled.
         * \param jfsize_sblks The size of each journal file expressed in softblocks.
         * \param wcache_num_pages The number of write cache pages to create.
         * \param wcache_pgsize_sblks The size in sblks of each write cache page.
@@ -203,7 +203,7 @@
         * /brief Initialize journal by recovering state from previously written journal.
         *
         * Initialize journal by recovering state from previously written journal. The journal files
-        * are analyzed, and all records that have not been dequeued and that remain in the jouranl
+        * are analyzed, and all records that have not been dequeued and that remain in the journal
         * will be available for reading. The journal is placed in a read-only state until
         * recovered() is called; any calls to enqueue or dequeue will fail with an exception
         * in this state.
@@ -222,7 +222,7 @@
         *     maximum total number of files allowed in the journal (original plus those added by auto-expand mode). If
         *     this number of files exist and the journal runs out of space, an exception will be thrown. This number
         *     must be greater than the num_jfiles parameter value but cannot exceed the maximum number of files for a
-        *     single journal; if num_jfiles is already at its maximum value, then auto-expand wil be disabled.
+        *     single journal; if num_jfiles is already at its maximum value, then auto-expand will be disabled.
         * \param jfsize_sblks The size of each journal file expressed in softblocks.
         * \param wcache_num_pages The number of write cache pages to create.
         * \param wcache_pgsize_sblks The size in sblks of each write cache page.
@@ -330,7 +330,7 @@
         *
         * If <i>dsize_avail</i> &lt; <i>dsize</i>, then not all of the data is available or part of
         * the data is in non-contiguous memory, and a subsequent call will update both the pointer
-        * and <i>dsize_avail</i> if more pages have returned from AIO. 
+        * and <i>dsize_avail</i> if more pages have returned from AIO.
         *
         * The <i>dsize_avail</i> parameter will return the amount of data from this record that is
         * available in the page cache as contiguous memory, even if it spans page cache boundaries.
@@ -343,7 +343,7 @@
         * this function. It must be consumed prior to getting the next record. This can be done by
         * calling discard_data_record() or read_data_record(). However, if parameter
         * <i>auto_discard</i> is set to <b><i>true</i></b>, then this record will be automatically
-        * consumed when the entire record has become available whithout having to explicitly call
+        * consumed when the entire record has become available without having to explicitly call
         * discard_next_data_record() or read_data_record().
         *
         * If the current record is an open transactional record, then it cannot be read until it is
@@ -373,7 +373,7 @@
         * \param data Pointer to data pointer which will point to the first byte of the next record
         *     data.
         * \param auto_discard If <b><i>true</i></b>, automatically discard the record being read if
-        *     the entire record is avialable (i.e. dsize == dsize_avail). Otherwise
+        *     the entire record is available (i.e. dsize == dsize_avail). Otherwise
         *     discard_next_data_record() must be explicitly called.
         *
         * \exception TODO
@@ -395,7 +395,7 @@
 
         /**
         * \brief Reads data from the journal. It is the responsibility of the reader to free
-        *     the memeory that is allocated through this call - see below for detials.
+        *     the memory that is allocated through this call - see below for details.
         *
         * Reads the next non-dequeued data record from the journal.
         *
@@ -539,11 +539,11 @@
         /**
         * \brief Stop the journal from accepting any further requests to read or write data.
         *
-        * This operation is used to stop the jouranl. This is the normal mechanism for bringing the
+        * This operation is used to stop the journal. This is the normal mechanism for bringing the
         * journal to an orderly stop. Any outstanding AIO operations or partially written pages in
         * the write page cache will by flushed and will complete.
         *
-        * <b>Note:</b> The jouranl cannot be restarted without either initailizing it or restoring
+        * <b>Note:</b> The journal cannot be restarted without either initializing it or restoring
         *     it.
         *
         * \param block_till_aio_cmpl If true, will block the thread while waiting for all
@@ -588,7 +588,7 @@
         inline u_int32_t get_open_txn_cnt() const { return _tmap.size(); }
         // TODO Make this a const, but txn_map must support const first.
         inline txn_map& get_txn_map() { return _tmap; }
-        
+
         /**
         * \brief Check if the journal is stopped.
         *
@@ -600,14 +600,14 @@
         /**
         * \brief Check if the journal is ready to read and write data.
         *
-        * Checks if the jouranl is ready to read and write data. This function will return
+        * Checks if the journal is ready to read and write data. This function will return
         * <b><i>true</i></b> if the journal has been either initialized or restored, and the stop()
         * function has not been called since the initialization.
         *
-        * Note that the jouranl may also be stopped if an internal error occurs (such as running out
-        * of data jouranl file space).
+        * Note that the journal may also be stopped if an internal error occurs (such as running out
+        * of data journal file space).
         *
-        * \return <b><i>true</i></b> if the jouranl is ready to read and write data;
+        * \return <b><i>true</i></b> if the journal is ready to read and write data;
         *     <b><i>false</i></b> otherwise.
         */
         inline bool is_ready() const { return _init_flag && !_stop_flag; }
@@ -637,12 +637,12 @@
         inline fcntl* get_fcntlp(const u_int16_t lfid) const { return _lpmgr.get_fcntlp(lfid); }
 
         inline u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
-        
+
         // Logging
         virtual void log(log_level level, const std::string& log_stmt) const;
         virtual void log(log_level level, const char* const log_stmt) const;
 
-        // FIXME these are _rmgr to _wmgr interactions, remove when _rmgr contains ref to _wmgr:        
+        // FIXME these are _rmgr to _wmgr interactions, remove when _rmgr contains ref to _wmgr:
         void chk_wr_frot();
         inline u_int32_t unflushed_dblks() { return _wmgr.unflushed_dblks(); }
         void fhdr_wr_sync(const u_int16_t lid);
@@ -695,10 +695,10 @@
 
         bool jfile_cycle(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd,
                 const bool jump_fro);
-        
+
         bool check_owi(const u_int16_t fid, rec_hdr& h, bool& lowi, rcvdat& rd,
                 std::streampos& read_pos);
-        
+
         void check_journal_alignment(const u_int16_t fid, std::streampos& rec_offset);
     };
 




More information about the rhmessaging-commits mailing list