rhmessaging commits: r1858 - in store/trunk/cpp/lib: jrnl and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-08 08:08:21 -0400 (Tue, 08 Apr 2008)
New Revision: 1858
Modified:
store/trunk/cpp/lib/IdSequence.h
store/trunk/cpp/lib/jrnl/jexception.hpp
Log:
F9 cleanup
Modified: store/trunk/cpp/lib/IdSequence.h
===================================================================
--- store/trunk/cpp/lib/IdSequence.h 2008-04-08 11:09:18 UTC (rev 1857)
+++ store/trunk/cpp/lib/IdSequence.h 2008-04-08 12:08:21 UTC (rev 1858)
@@ -26,6 +26,7 @@
#include <qpid/framing/amqp_types.h>
#include <qpid/sys/Mutex.h>
+#include <sys/types.h>
namespace rhm{
namespace bdbstore{
Modified: store/trunk/cpp/lib/jrnl/jexception.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jexception.hpp 2008-04-08 11:09:18 UTC (rev 1857)
+++ store/trunk/cpp/lib/jrnl/jexception.hpp 2008-04-08 12:08:21 UTC (rev 1858)
@@ -43,6 +43,7 @@
#include <exception>
#include <string>
+#include <string.h>
#include <sys/types.h>
// Macro for formatting commom system errors
16 years, 9 months
rhmessaging commits: r1857 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-08 07:09:18 -0400 (Tue, 08 Apr 2008)
New Revision: 1857
Modified:
store/trunk/cpp/lib/jrnl/deq_hdr.hpp
store/trunk/cpp/lib/jrnl/file_hdr.hpp
store/trunk/cpp/lib/jrnl/jerrno.hpp
store/trunk/cpp/lib/jrnl/nlfh.hpp
store/trunk/cpp/lib/jrnl/slock.hpp
Log:
F9 cleanup
Modified: store/trunk/cpp/lib/jrnl/deq_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_hdr.hpp 2008-04-08 09:44:25 UTC (rev 1856)
+++ store/trunk/cpp/lib/jrnl/deq_hdr.hpp 2008-04-08 11:09:18 UTC (rev 1857)
@@ -34,8 +34,6 @@
#define rhm_journal_deq_hdr_hpp
#include <jrnl/rec_hdr.hpp>
-//#include <jrnl/jcfg.hpp>
-//#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/file_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-08 09:44:25 UTC (rev 1856)
+++ store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-08 11:09:18 UTC (rev 1857)
@@ -39,7 +39,6 @@
#include <jrnl/jerrno.hpp>
#include <jrnl/jexception.hpp>
#include <sstream>
-//#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/jerrno.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jerrno.hpp 2008-04-08 09:44:25 UTC (rev 1856)
+++ store/trunk/cpp/lib/jrnl/jerrno.hpp 2008-04-08 11:09:18 UTC (rev 1857)
@@ -43,6 +43,7 @@
#include <map>
#include <string>
+#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/nlfh.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-08 09:44:25 UTC (rev 1856)
+++ store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-08 11:09:18 UTC (rev 1857)
@@ -41,7 +41,6 @@
}
#include <string>
-//#include <jrnl/file_hdr.hpp>
#include <jrnl/rcvdat.hpp>
#include <sys/types.h>
Modified: store/trunk/cpp/lib/jrnl/slock.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/slock.hpp 2008-04-08 09:44:25 UTC (rev 1856)
+++ store/trunk/cpp/lib/jrnl/slock.hpp 2008-04-08 11:09:18 UTC (rev 1857)
@@ -78,7 +78,7 @@
PTHREAD_CHK(::pthread_mutex_unlock(_m), "pthread_mutex_unlock", "stlock",
"~stlock");
}
- inline const bool locked() const { return _locked; }
+ inline bool locked() const { return _locked; }
};
} // namespace journal
16 years, 9 months
rhmessaging commits: r1856 - store/tags.
by rhmessaging-commits@lists.jboss.org
Author: aidanskinner
Date: 2008-04-08 05:44:25 -0400 (Tue, 08 Apr 2008)
New Revision: 1856
Added:
store/tags/M2.1-RC1/
Log:
Tag RC1
Copied: store/tags/M2.1-RC1 (from rev 1855, store/branches/java/M2.1-release)
16 years, 9 months
rhmessaging commits: r1855 - store/branches/java.
by rhmessaging-commits@lists.jboss.org
Author: aidanskinner
Date: 2008-04-08 05:43:15 -0400 (Tue, 08 Apr 2008)
New Revision: 1855
Added:
store/branches/java/M2.1-release/
Log:
branche for M2.1 release
Copied: store/branches/java/M2.1-release (from rev 1854, store/branches/java/M2.1)
16 years, 9 months
rhmessaging commits: r1854 - mgmt/cumin/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-07 18:02:59 -0400 (Mon, 07 Apr 2008)
New Revision: 1854
Modified:
mgmt/cumin/python/wooly/tables.py
Log:
Minor cleanup
Modified: mgmt/cumin/python/wooly/tables.py
===================================================================
--- mgmt/cumin/python/wooly/tables.py 2008-04-07 22:02:20 UTC (rev 1853)
+++ mgmt/cumin/python/wooly/tables.py 2008-04-07 22:02:59 UTC (rev 1854)
@@ -157,13 +157,8 @@
def render_sql(self, session, *args):
writer = Writer()
self.__sql_tmpl.render(writer, session, *args)
- sql = writer.to_string()
+ return writer.to_string()
- #print "sql -----------------------"
- #print sql
-
- return sql
-
def render_sql_where(self, session, *args):
pass
@@ -178,13 +173,8 @@
def render_count_sql(self, session, *args):
writer = Writer()
self.__count_sql_tmpl.render(writer, session, *args)
- sql = writer.to_string()
+ return writer.to_string()
- #print "sql -----------------------"
- #print sql
-
- return sql
-
def build_sql(self, elems):
writer = Writer()
16 years, 9 months
rhmessaging commits: r1853 - mgmt/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-07 18:02:20 -0400 (Mon, 07 Apr 2008)
New Revision: 1853
Modified:
mgmt/cumin/python/cumin/model.py
Log:
Repair some misnamed methods.
Modified: mgmt/cumin/python/cumin/model.py
===================================================================
--- mgmt/cumin/python/cumin/model.py 2008-04-07 20:58:51 UTC (rev 1852)
+++ mgmt/cumin/python/cumin/model.py 2008-04-07 22:02:20 UTC (rev 1853)
@@ -471,9 +471,12 @@
#action.title = "Send Ping"
#action.summary = True
- def show(self, session, system):
+ def show_object(self, session, system):
return self.cumin_model.show_main(session).show_system(session, system)
+ def get_object_name(self, object):
+ return object.nodeName
+
class CuminBroker(RemoteClass):
def __init__(self, model):
super(CuminBroker, self).__init__(model, "broker", Broker, BrokerStats)
@@ -508,7 +511,7 @@
prop = CuminProperty(self, "dataDir")
prop.title = "Data Directory"
- def show(self, session, broker):
+ def show_object(self, session, broker):
return self.cumin_model.show_main(session).show_broker(session, broker)
class CuminQueue(RemoteClass):
16 years, 9 months
rhmessaging commits: r1852 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-07 16:58:51 -0400 (Mon, 07 Apr 2008)
New Revision: 1852
Modified:
store/trunk/cpp/lib/jrnl/aio_cb.hpp
store/trunk/cpp/lib/jrnl/jinf.hpp
store/trunk/cpp/lib/jrnl/nlfh.hpp
store/trunk/cpp/lib/jrnl/rcvdat.hpp
Log:
Additional F9 cleanups
Modified: store/trunk/cpp/lib/jrnl/aio_cb.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/aio_cb.hpp 2008-04-07 20:35:18 UTC (rev 1851)
+++ store/trunk/cpp/lib/jrnl/aio_cb.hpp 2008-04-07 20:58:51 UTC (rev 1852)
@@ -32,6 +32,7 @@
#define rhm_journal_aio_cb_hpp
#include <vector>
+#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/jinf.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.hpp 2008-04-07 20:35:18 UTC (rev 1851)
+++ store/trunk/cpp/lib/jrnl/jinf.hpp 2008-04-07 20:58:51 UTC (rev 1852)
@@ -33,6 +33,7 @@
#define rhm_journal_jinf_hpp
#include <string>
+#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/nlfh.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-07 20:35:18 UTC (rev 1851)
+++ store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-07 20:58:51 UTC (rev 1852)
@@ -43,6 +43,7 @@
#include <string>
//#include <jrnl/file_hdr.hpp>
#include <jrnl/rcvdat.hpp>
+#include <sys/types.h>
namespace rhm
{
Modified: store/trunk/cpp/lib/jrnl/rcvdat.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rcvdat.hpp 2008-04-07 20:35:18 UTC (rev 1851)
+++ store/trunk/cpp/lib/jrnl/rcvdat.hpp 2008-04-07 20:58:51 UTC (rev 1852)
@@ -37,6 +37,7 @@
#include <sstream>
#include <vector>
#include <jrnl/jcfg.hpp>
+#include <sys/types.h>
namespace rhm
{
16 years, 9 months
rhmessaging commits: r1851 - in store/trunk/cpp: lib/jrnl and 2 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2008-04-07 16:35:18 -0400 (Mon, 07 Apr 2008)
New Revision: 1851
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/jrnl/cvar.hpp
store/trunk/cpp/lib/jrnl/data_tok.hpp
store/trunk/cpp/lib/jrnl/deq_hdr.hpp
store/trunk/cpp/lib/jrnl/deq_rec.cpp
store/trunk/cpp/lib/jrnl/deq_rec.hpp
store/trunk/cpp/lib/jrnl/enq_hdr.hpp
store/trunk/cpp/lib/jrnl/enq_map.cpp
store/trunk/cpp/lib/jrnl/enq_map.hpp
store/trunk/cpp/lib/jrnl/enq_rec.cpp
store/trunk/cpp/lib/jrnl/enq_rec.hpp
store/trunk/cpp/lib/jrnl/file_hdr.hpp
store/trunk/cpp/lib/jrnl/jcntl.cpp
store/trunk/cpp/lib/jrnl/jcntl.hpp
store/trunk/cpp/lib/jrnl/jdir.cpp
store/trunk/cpp/lib/jrnl/jdir.hpp
store/trunk/cpp/lib/jrnl/jexception.hpp
store/trunk/cpp/lib/jrnl/jinf.cpp
store/trunk/cpp/lib/jrnl/jinf.hpp
store/trunk/cpp/lib/jrnl/jrec.hpp
store/trunk/cpp/lib/jrnl/nlfh.cpp
store/trunk/cpp/lib/jrnl/nlfh.hpp
store/trunk/cpp/lib/jrnl/pmgr.hpp
store/trunk/cpp/lib/jrnl/rec_hdr.hpp
store/trunk/cpp/lib/jrnl/rec_tail.hpp
store/trunk/cpp/lib/jrnl/rmgr.cpp
store/trunk/cpp/lib/jrnl/rmgr.hpp
store/trunk/cpp/lib/jrnl/rrfc.hpp
store/trunk/cpp/lib/jrnl/txn_hdr.hpp
store/trunk/cpp/lib/jrnl/txn_map.cpp
store/trunk/cpp/lib/jrnl/txn_map.hpp
store/trunk/cpp/lib/jrnl/txn_rec.cpp
store/trunk/cpp/lib/jrnl/txn_rec.hpp
store/trunk/cpp/lib/jrnl/wmgr.cpp
store/trunk/cpp/lib/jrnl/wmgr.hpp
store/trunk/cpp/lib/jrnl/wrfc.cpp
store/trunk/cpp/lib/jrnl/wrfc.hpp
store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
store/trunk/cpp/tests/jrnl/jtt/args.cpp
store/trunk/cpp/tests/jrnl/jtt/args.hpp
store/trunk/cpp/tests/jrnl/jtt/data_src.hpp
store/trunk/cpp/tests/jrnl/jtt/jrnl_init_params.hpp
store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp
store/trunk/cpp/tests/jrnl/jtt/read_arg.hpp
store/trunk/cpp/tests/jrnl/jtt/test_case.cpp
store/trunk/cpp/tests/jrnl/jtt/test_case.hpp
store/trunk/cpp/tests/jrnl/jtt/test_case_result.hpp
store/trunk/cpp/tests/jrnl/jtt/test_case_result_agregation.hpp
store/trunk/cpp/tests/jrnl/jtt/test_case_set.cpp
store/trunk/cpp/tests/jrnl/jtt/test_case_set.hpp
store/trunk/cpp/tests/jrnl/msg_consumer.hpp
store/trunk/cpp/tests/jrnl/msg_producer.hpp
Log:
F9 cleanup: removed redundant const modifier for integral return types on all function calls
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -194,7 +194,7 @@
#define MAX_AIO_SLEEPS 500
#define AIO_SLEEP_TIME 1000000
-const bool
+bool
JournalImpl::loadMsgContent(u_int64_t rid, std::string& data, size_t offset, size_t length)
{
if (_dtok.rid() != rid)
@@ -327,7 +327,7 @@
jcntl::stop(block_till_aio_cmpl);
}
-const iores
+iores
JournalImpl::flush(const bool block_till_aio_cmpl)
{
const iores res = jcntl::flush(block_till_aio_cmpl);
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/JournalImpl.h 2008-04-07 20:35:18 UTC (rev 1851)
@@ -117,8 +117,7 @@
// Temporary fn to read and save last msg read from journal so it can be assigned
// in chunks. To be replaced when coding to do this direct from the journal is ready.
// Returns true if the record is extern, false if local.
- const bool loadMsgContent(u_int64_t rid, std::string& data, size_t offset,
- size_t length);
+ bool loadMsgContent(u_int64_t rid, std::string& data, size_t offset, size_t length);
// Overrides for write inactivity timer
void enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
@@ -150,7 +149,7 @@
void log(journal::log_level level, const char* const log_stmt) const;
// Overrides for get_events timer
- const journal::iores flush(const bool block_till_aio_cmpl = false);
+ journal::iores flush(const bool block_till_aio_cmpl = false);
// TimerTask callback
void getEventsFire();
Modified: store/trunk/cpp/lib/jrnl/cvar.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/cvar.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/cvar.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -59,7 +59,7 @@
PTHREAD_CHK(::pthread_cond_timedwait(&_c, &_m, &ts), "pthread_cond_timedwait", "cvar",
"timedwait");
}
- inline const bool waitintvl(const long intvl_ns)
+ inline bool waitintvl(const long intvl_ns)
{
time_ns t; t.now(); t+=intvl_ns;
int ret = ::pthread_cond_timedwait(&_c, &_m, &t);
Modified: store/trunk/cpp/lib/jrnl/data_tok.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/data_tok.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/data_tok.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -112,46 +112,46 @@
data_tok();
virtual ~data_tok();
- inline const u_int64_t id() const { return _icnt; }
- inline const write_state wstate() const { return _wstate; }
+ inline u_int64_t id() const { return _icnt; }
+ inline write_state wstate() const { return _wstate; }
const char* wstate_str() const;
static const char* wstate_str(write_state wstate);
- inline const read_state rstate() const { return _rstate; }
+ inline read_state rstate() const { return _rstate; }
const char* rstate_str() const;
static const char* rstate_str(read_state rstate);
- inline const bool is_writable() const { return _wstate == NONE || _wstate == ENQ_PART; }
- inline const bool is_enqueued() const { return _wstate == ENQ; }
- inline const bool is_readable() const { return _wstate == ENQ; }
- inline const bool is_read() const { return _rstate == READ; }
- inline const bool is_dequeueable() const { return _wstate == ENQ || _wstate == DEQ_PART; }
+ inline bool is_writable() const { return _wstate == NONE || _wstate == ENQ_PART; }
+ inline bool is_enqueued() const { return _wstate == ENQ; }
+ inline bool is_readable() const { return _wstate == ENQ; }
+ inline bool is_read() const { return _rstate == READ; }
+ inline bool is_dequeueable() const { return _wstate == ENQ || _wstate == DEQ_PART; }
inline void set_wstate(const write_state wstate) { _wstate = wstate; }
void set_rstate(const read_state rstate);
- inline const size_t dsize() const { return _dsize; }
+ inline size_t dsize() const { return _dsize; }
inline void set_dsize(size_t dsize) { _dsize = dsize; }
- inline const u_int32_t dblocks_written() const { return _dblks_written; }
+ inline u_int32_t dblocks_written() const { return _dblks_written; }
inline void incr_dblocks_written(u_int32_t dblks_written)
{ _dblks_written += dblks_written; }
inline void set_dblocks_written(u_int32_t dblks_written) { _dblks_written = dblks_written; }
- inline const u_int32_t dblocks_read() const { return _dblks_read; }
+ inline u_int32_t dblocks_read() const { return _dblks_read; }
inline void incr_dblocks_read(u_int32_t dblks_read) { _dblks_read += dblks_read; }
inline void set_dblocks_read(u_int32_t dblks_read) { _dblks_read = dblks_read; }
- inline const u_int32_t pg_cnt() const { return _pg_cnt; }
- inline const u_int32_t incr_pg_cnt() { return ++_pg_cnt; }
- inline const u_int32_t decr_pg_cnt() { assert(_pg_cnt != 0); return --_pg_cnt; }
+ inline u_int32_t pg_cnt() const { return _pg_cnt; }
+ inline u_int32_t incr_pg_cnt() { return ++_pg_cnt; }
+ inline u_int32_t decr_pg_cnt() { assert(_pg_cnt != 0); return --_pg_cnt; }
- inline const u_int16_t fid() const { return _fid; }
+ inline u_int16_t fid() const { return _fid; }
inline void set_fid(const u_int16_t fid) { _fid = fid; }
- inline const u_int64_t rid() const { return _rid; }
+ inline u_int64_t rid() const { return _rid; }
inline void set_rid(const u_int64_t rid) { _rid = rid; }
- inline const u_int64_t dequeue_rid() const {return _dequeue_rid; }
+ inline u_int64_t dequeue_rid() const {return _dequeue_rid; }
inline void set_dequeue_rid(const u_int64_t rid) { _dequeue_rid = rid; }
- inline const bool external_rid() const { return _external_rid; }
+ inline bool external_rid() const { return _external_rid; }
inline void set_external_rid(const bool external_rid) { _external_rid = external_rid; }
- inline const bool has_xid() const { return !_xid.empty(); }
+ inline bool has_xid() const { return !_xid.empty(); }
inline const std::string& xid() const { return _xid; }
inline void clear_xid() { _xid.clear(); }
inline void set_xid(const std::string& xid) { _xid.assign(xid); }
Modified: store/trunk/cpp/lib/jrnl/deq_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_hdr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/deq_hdr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -120,7 +120,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(deq_hdr); }
+ inline static size_t size() { return sizeof(deq_hdr); }
};
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/deq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/deq_rec.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -86,7 +86,7 @@
_buff = 0;
}
-const u_int32_t
+u_int32_t
deq_rec::encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(wptr != 0);
@@ -198,7 +198,7 @@
return size_dblks(wr_cnt);
}
-const u_int32_t
+u_int32_t
deq_rec::decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(rptr != 0);
@@ -314,7 +314,7 @@
return size_dblks(rd_cnt);
}
-const bool
+bool
deq_rec::rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs)
{
if (rec_offs == 0)
@@ -369,7 +369,7 @@
return true;
}
-const size_t
+size_t
deq_rec::get_xid(void** const xidpp)
{
if (!_buff)
@@ -395,13 +395,13 @@
return str;
}
-const size_t
+size_t
deq_rec::xid_size() const
{
return _deq_hdr._xidsize;
}
-const size_t
+size_t
deq_rec::rec_size() const
{
return deq_hdr::size() + (_deq_hdr._xidsize ? _deq_hdr._xidsize + rec_tail::size() : 0);
Modified: store/trunk/cpp/lib/jrnl/deq_rec.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/deq_rec.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/deq_rec.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -74,19 +74,19 @@
// Prepare instance for use in writing data to journal
void reset(const u_int64_t rid, const u_int64_t drid, const void* const xidp,
const size_t xidlen, const bool owi);
- const u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
- const u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
+ u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
+ u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
u_int32_t max_size_dblks);
// Decode used for recover
- const bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
+ bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
- inline const u_int64_t rid() const { return _deq_hdr._rid; }
- inline const u_int64_t deq_rid() const { return _deq_hdr._deq_rid; }
- const size_t get_xid(void** const xidpp);
+ inline u_int64_t rid() const { return _deq_hdr._rid; }
+ inline u_int64_t deq_rid() const { return _deq_hdr._deq_rid; }
+ size_t get_xid(void** const xidpp);
std::string& str(std::string& str) const;
- inline const size_t data_size() const { return 0; } // This record never carries data
- const size_t xid_size() const;
- const size_t rec_size() const;
+ inline size_t data_size() const { return 0; } // This record never carries data
+ size_t xid_size() const;
+ size_t rec_size() const;
private:
virtual void chk_hdr() const;
Modified: store/trunk/cpp/lib/jrnl/enq_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_hdr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/enq_hdr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -134,7 +134,7 @@
{ set_transient(transient); }
- inline const bool is_transient() const { return _uflag & ENQ_HDR_TRANSIENT_MASK; }
+ inline bool is_transient() const { return _uflag & ENQ_HDR_TRANSIENT_MASK; }
inline void set_transient(const bool transient)
{
@@ -142,7 +142,7 @@
_uflag & (~ENQ_HDR_TRANSIENT_MASK);
}
- inline const bool is_external() const { return _uflag & ENQ_HDR_EXTERNAL_MASK; }
+ inline bool is_external() const { return _uflag & ENQ_HDR_EXTERNAL_MASK; }
inline void set_external(const bool external)
{
@@ -153,7 +153,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(enq_hdr); }
+ inline static size_t size() { return sizeof(enq_hdr); }
};
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/enq_map.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_map.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/enq_map.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -75,7 +75,7 @@
}
}
-const u_int16_t
+u_int16_t
enq_map::get_fid(const u_int64_t rid)
{
emap_itr itr;
@@ -98,7 +98,7 @@
return itr->second.first;
}
-const u_int16_t
+u_int16_t
enq_map::get_remove_fid(const u_int64_t rid, const bool txn_flag)
{
slock s(&_mutex);
@@ -120,7 +120,7 @@
return fid;
}
-const bool
+bool
enq_map::is_enqueued(const u_int64_t rid)
{
emap_itr itr;
@@ -163,7 +163,7 @@
itr->second.second = false;
}
-const bool
+bool
enq_map::is_locked(const u_int64_t rid)
{
emap_itr itr;
Modified: store/trunk/cpp/lib/jrnl/enq_map.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_map.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/enq_map.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -88,15 +88,15 @@
void insert_fid(const u_int64_t rid, const u_int16_t fid);
void insert_fid(const u_int64_t rid, const u_int16_t fid, const bool locked);
- const u_int16_t get_fid(const u_int64_t rid);
- const u_int16_t get_remove_fid(const u_int64_t rid, const bool txn_flag = false);
- const bool is_enqueued(const u_int64_t rid);
+ u_int16_t get_fid(const u_int64_t rid);
+ u_int16_t get_remove_fid(const u_int64_t rid, const bool txn_flag = false);
+ bool is_enqueued(const u_int64_t rid);
void lock(const u_int64_t rid);
void unlock(const u_int64_t rid);
- const bool is_locked(const u_int64_t rid);
+ bool is_locked(const u_int64_t rid);
inline void clear() { _map.clear(); }
- inline const bool empty() const { return _map.empty(); }
- inline const u_int16_t size() const { return (u_int16_t)_map.size(); }
+ inline bool empty() const { return _map.empty(); }
+ inline u_int16_t size() const { return (u_int16_t)_map.size(); }
void rid_list(std::vector<u_int64_t>& rv);
void fid_list(std::vector<u_int16_t>& fv);
};
Modified: store/trunk/cpp/lib/jrnl/enq_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/enq_rec.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -103,7 +103,7 @@
_enq_tail._rid = rid;
}
-const u_int32_t
+u_int32_t
enq_rec::encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(wptr != 0);
@@ -248,7 +248,7 @@
return size_dblks(wr_cnt);
}
-const u_int32_t
+u_int32_t
enq_rec::decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(rptr != 0);
@@ -429,7 +429,7 @@
return size_dblks(rd_cnt);
}
-const bool
+bool
enq_rec::rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs)
{
if (rec_offs == 0)
@@ -507,7 +507,7 @@
return true;
}
-const size_t
+size_t
enq_rec::get_xid(void** const xidpp)
{
if (!_buff)
@@ -519,7 +519,7 @@
return _enq_hdr._xidsize;
}
-const size_t
+size_t
enq_rec::get_data(void** const datapp)
{
if (!_buff)
@@ -548,13 +548,13 @@
return str;
}
-const size_t
+size_t
enq_rec::rec_size() const
{
return rec_size(_enq_hdr._xidsize, _enq_hdr._dsize, _enq_hdr.is_external());
}
-const size_t
+size_t
enq_rec::rec_size(const size_t xidsize, const size_t dsize, const bool external)
{
if (external)
Modified: store/trunk/cpp/lib/jrnl/enq_rec.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/enq_rec.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/enq_rec.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -84,22 +84,22 @@
const void* const xidp, const size_t xidlen, const bool owi, const bool transient,
const bool external);
- const u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
- const u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
+ u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
+ u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
u_int32_t max_size_dblks);
// Decode used for recover
- const bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
+ bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
- const size_t get_xid(void** const xidpp);
- const size_t get_data(void** const datapp);
- inline const bool is_transient() const { return _enq_hdr.is_transient(); }
- inline const bool is_external() const { return _enq_hdr.is_external(); }
+ size_t get_xid(void** const xidpp);
+ size_t get_data(void** const datapp);
+ inline bool is_transient() const { return _enq_hdr.is_transient(); }
+ inline bool is_external() const { return _enq_hdr.is_external(); }
std::string& str(std::string& str) const;
- inline const size_t data_size() const { return _enq_hdr._dsize; }
- inline const size_t xid_size() const { return _enq_hdr._xidsize; }
- const size_t rec_size() const;
- static const size_t rec_size(const size_t xidsize, const size_t dsize, const bool external);
- inline const u_int64_t rid() const { return _enq_hdr._rid; }
+ inline size_t data_size() const { return _enq_hdr._dsize; }
+ inline size_t xid_size() const { return _enq_hdr._xidsize; }
+ size_t rec_size() const;
+ static size_t rec_size(const size_t xidsize, const size_t dsize, const bool external);
+ inline u_int64_t rid() const { return _enq_hdr._rid; }
void set_rid(const u_int64_t rid);
private:
Modified: store/trunk/cpp/lib/jrnl/file_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/file_hdr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -197,7 +197,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(file_hdr); }
+ inline static size_t size() { return sizeof(file_hdr); }
}; // struct file_hdr
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/jcntl.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jcntl.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -227,7 +227,7 @@
}
-const iores
+iores
jcntl::enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const bool transient)
{
@@ -241,7 +241,7 @@
}
}
-const iores
+iores
jcntl::enqueue_extern_data_record(const size_t tot_data_len, data_tok* dtokp, const bool transient)
{
check_wstatus("enqueue_extern_data_record");
@@ -254,7 +254,7 @@
}
}
-const iores
+iores
jcntl::enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const std::string& xid,
const bool transient)
@@ -269,7 +269,7 @@
}
}
-const iores
+iores
jcntl::enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
const std::string& xid, const bool transient)
{
@@ -284,7 +284,7 @@
}
/* TODO
-const iores
+iores
jcntl::get_data_record(const u_int64_t& rid, const size_t& dsize, const size_t& dsize_avail,
const void** const data, bool auto_discard)
{
@@ -293,7 +293,7 @@
} */
/* TODO
-const iores
+iores
jcntl::discard_data_record(data_tok* const dtokp)
{
check_rstatus("discard_data_record");
@@ -302,7 +302,7 @@
#define MAX_RCINVALID_CNT 50
#define RCINVALID_SLEEP_TIME_MS 2
-const iores
+iores
jcntl::read_data_record(void** const datapp, size_t& dsize, void** const xidpp, size_t& xidsize,
bool& transient, bool& external, data_tok* const dtokp)
{
@@ -325,7 +325,7 @@
return res;
}
-const iores
+iores
jcntl::dequeue_data_record(data_tok* const dtokp)
{
check_wstatus("dequeue_data");
@@ -337,7 +337,7 @@
}
}
-const iores
+iores
jcntl::dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid)
{
check_wstatus("dequeue_data");
@@ -349,7 +349,7 @@
}
}
-const iores
+iores
jcntl::txn_abort(data_tok* const dtokp, const std::string& xid)
{
check_wstatus("txn_abort");
@@ -361,7 +361,7 @@
}
}
-const iores
+iores
jcntl::txn_commit(data_tok* const dtokp, const std::string& xid)
{
check_wstatus("txn_commit");
@@ -373,13 +373,13 @@
}
}
-const bool
+bool
jcntl::is_txn_synced(const std::string& xid)
{
return _wmgr.is_txn_synced(xid);
}
-const u_int32_t
+u_int32_t
jcntl::get_wr_events()
{
stlock t(&_wr_mutex);
@@ -388,7 +388,7 @@
return 0;
}
-const u_int32_t
+u_int32_t
jcntl::get_rd_events()
{
return _rmgr.get_events();
@@ -406,7 +406,7 @@
flush(block_till_aio_cmpl);
}
-const iores
+iores
jcntl::flush(const bool block_till_aio_cmpl)
{
if (!_init_flag)
@@ -497,7 +497,7 @@
}
}
-const bool
+bool
jcntl::handle_aio_wait(const iores res, iores& resout, const data_tok* dtp)
{
// TODO: factor out the common while loops below into a common fn
@@ -610,7 +610,7 @@
}
}
-const bool
+bool
jcntl::rcvr_get_next_record(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd)
{
size_t cum_size_read = 0;
@@ -763,7 +763,7 @@
return true;
}
-const bool
+bool
jcntl::decode(jrec& rec, u_int16_t& fid, std::ifstream* ifsp, size_t& cum_size_read, rec_hdr& h,
bool& lowi, rcvdat& rd, std::streampos& file_offs)
{
@@ -794,7 +794,7 @@
return true;
}
-const bool
+bool
jcntl::jfile_cycle(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd, const bool jump_fro)
{
if (ifsp->is_open())
@@ -841,7 +841,7 @@
return true;
}
-const bool
+bool
jcntl::check_owi(const u_int16_t fid, rec_hdr& h, bool& lowi, rcvdat& rd, std::streampos& file_pos)
{
if (rd._ffid ? h.get_owi() == lowi : h.get_owi() != lowi) // Overwrite indicator changed
Modified: store/trunk/cpp/lib/jrnl/jcntl.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jcntl.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jcntl.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -272,10 +272,10 @@
*
* \exception TODO
*/
- const iores enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
+ iores enqueue_data_record(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const bool transient = false);
- const iores enqueue_extern_data_record(const size_t tot_data_len, data_tok* dtokp,
+ iores enqueue_extern_data_record(const size_t tot_data_len, data_tok* dtokp,
const bool transient = false);
/**
@@ -291,10 +291,10 @@
*
* \exception TODO
*/
- const iores enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
+ iores enqueue_txn_data_record(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const std::string& xid,
const bool transient = false);
- const iores enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
+ iores enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
const std::string& xid, const bool transient = false);
/* TODO
@@ -356,7 +356,7 @@
* \exception TODO
*
// *** NOT YET IMPLEMENTED ***
- const iores get_data_record(const u_int64_t& rid, const size_t& dsize,
+ iores get_data_record(const u_int64_t& rid, const size_t& dsize,
const size_t& dsize_avail, const void** const data, bool auto_discard = false);
*/
@@ -367,7 +367,7 @@
* \exception TODO
*
// *** NOT YET IMPLEMENTED ***
- const iores discard_data_record(data_tok* const dtokp);
+ iores discard_data_record(data_tok* const dtokp);
*/
/**
@@ -403,7 +403,7 @@
*
* \exception TODO
*/
- const iores read_data_record(void** const datapp, size_t& dsize, void** const xidpp,
+ iores read_data_record(void** const datapp, size_t& dsize, void** const xidpp,
size_t& xidsize, bool& transient, bool& external, data_tok* const dtokp);
/**
@@ -420,7 +420,7 @@
*
* \exception TODO
*/
- const iores dequeue_data_record(data_tok* const dtokp);
+ iores dequeue_data_record(data_tok* const dtokp);
/**
* \brief Dequeues (marks as no longer needed) data record in journal.
@@ -438,7 +438,7 @@
*
* \exception TODO
*/
- const iores dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid);
+ iores dequeue_txn_data_record(data_tok* const dtokp, const std::string& xid);
/**
* \brief Abort the transaction for all records enqueued or dequeued with the matching xid.
@@ -453,7 +453,7 @@
*
* \exception TODO
*/
- const iores txn_abort(data_tok* const dtokp, const std::string& xid);
+ iores txn_abort(data_tok* const dtokp, const std::string& xid);
/**
* \brief Commit the transaction for all records enqueued or dequeued with the matching xid.
@@ -468,7 +468,7 @@
*
* \exception TODO
*/
- const iores txn_commit(data_tok* const dtokp, const std::string& xid);
+ iores txn_commit(data_tok* const dtokp, const std::string& xid);
/**
* \brief Check whether all the enqueue records for the given xid have reached disk.
@@ -477,7 +477,7 @@
*
* \exception TODO
*/
- const bool is_txn_synced(const std::string& xid);
+ bool is_txn_synced(const std::string& xid);
/**
* \brief Forces a check for returned AIO write events.
@@ -486,7 +486,7 @@
* dequeue() operations, but if these operations cease, then this call needs to be made to
* force the processing of any outstanding AIO operations.
*/
- const u_int32_t get_wr_events();
+ u_int32_t get_wr_events();
/**
* \brief Forces a check for returned AIO read events.
@@ -495,7 +495,7 @@
* operations, but if these operations cease, then this call needs to be made to force the
* processing of any outstanding AIO operations.
*/
- const u_int32_t get_rd_events();
+ u_int32_t get_rd_events();
/**
* \brief Stop the journal from accepting any further requests to read or write data.
@@ -515,32 +515,32 @@
/**
* \brief Force a flush of the write page cache, creating a single AIO write operation.
*/
- const iores flush(const bool block_till_aio_cmpl = false);
+ iores flush(const bool block_till_aio_cmpl = false);
- inline const u_int32_t get_enq_cnt() const { return _emap.size(); }
+ inline u_int32_t get_enq_cnt() const { return _emap.size(); }
- inline const u_int32_t get_wr_outstanding_aio_dblks() const
+ inline u_int32_t get_wr_outstanding_aio_dblks() const
{ return _wrfc.aio_outstanding_dblks(); }
- inline const u_int32_t get_wr_outstanding_aio_dblks(u_int16_t pi) const
+ inline u_int32_t get_wr_outstanding_aio_dblks(u_int16_t pi) const
{ return _wrfc.file_handle(pi)->wr_aio_outstanding_dblks(); }
- inline const u_int32_t get_rd_outstanding_aio_dblks() const
+ inline u_int32_t get_rd_outstanding_aio_dblks() const
{ return _rrfc.aio_outstanding_dblks(); }
- inline const u_int32_t get_rd_outstanding_aio_dblks(u_int16_t pi) const
+ inline u_int32_t get_rd_outstanding_aio_dblks(u_int16_t pi) const
{ return _rrfc.file_handle(pi)->rd_aio_outstanding_dblks(); }
- inline const u_int16_t get_rd_fid() const { return _rrfc.index(); }
- inline const u_int16_t get_wr_fid() const { return _wrfc.index(); }
- inline const u_int16_t get_earliest_fid() const { return _wrfc.earliest_index(); }
+ inline u_int16_t get_rd_fid() const { return _rrfc.index(); }
+ inline u_int16_t get_wr_fid() const { return _wrfc.index(); }
+ inline u_int16_t get_earliest_fid() const { return _wrfc.earliest_index(); }
/**
* \brief Check if a particular rid is enqueued. Note that this function will return
* false if the rid is transactionally enqueued and is not committed, or if it is
* locked (i.e. transactionally dequeued, but the dequeue has not been committed).
*/
- inline const bool is_enqueued(const u_int64_t rid) { return _emap.is_enqueued(rid); }
+ inline bool is_enqueued(const u_int64_t rid) { return _emap.is_enqueued(rid); }
/**
* \brief Check if the journal is stopped.
@@ -563,9 +563,9 @@
* \return <b><i>true</i></b> if the jouranl is ready to read and write data;
* <b><i>false</i></b> otherwise.
*/
- inline const bool is_ready() const { return _init_flag and not _stop_flag; }
+ inline bool is_ready() const { return _init_flag and not _stop_flag; }
- inline const bool is_read_only() const { return _readonly_flag; }
+ inline bool is_read_only() const { return _readonly_flag; }
/**
* \brief Get the journal directory.
@@ -585,9 +585,9 @@
*/
inline const std::string& base_filename() const { return _base_filename; }
- inline const u_int16_t num_jfiles() const { return _num_jfiles; }
+ inline u_int16_t num_jfiles() const { return _num_jfiles; }
- inline const u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
+ inline u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
// Logging
virtual void log(log_level level, const std::string& log_stmt) const;
@@ -595,7 +595,7 @@
// these are _rmgr to _wmgr interactions, remove when _rmgr contains ref to _wmgr:
void chk_wr_frot();
- inline const u_int32_t unflushed_dblks() { return _wmgr.unflushed_dblks(); }
+ inline u_int32_t unflushed_dblks() { return _wmgr.unflushed_dblks(); }
@@ -624,23 +624,22 @@
* \brief Call that blocks until at least one message returns; used to wait for
* AIO wait conditions to clear.
*/
- const bool handle_aio_wait(const iores res, iores& resout, const data_tok* dtp);
+ bool handle_aio_wait(const iores res, iores& resout, const data_tok* dtp);
/**
* \brief Analyze journal for recovery.
*/
void rcvr_janalyze(rcvdat& rd, const std::vector<std::string>& prep_txn_list);
- const bool rcvr_get_next_record(u_int16_t& fid, std::ifstream* ifsp, bool& lowi,
- rcvdat& rd);
+ bool rcvr_get_next_record(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd);
- const bool decode(jrec& rec, u_int16_t& fid, std::ifstream* ifsp, size_t& cum_size_read,
+ bool decode(jrec& rec, u_int16_t& fid, std::ifstream* ifsp, size_t& cum_size_read,
rec_hdr& h, bool& lowi, rcvdat& rd, std::streampos& rec_offset);
- const bool jfile_cycle(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd,
+ bool jfile_cycle(u_int16_t& fid, std::ifstream* ifsp, bool& lowi, rcvdat& rd,
const bool jump_fro);
- const bool check_owi(const u_int16_t fid, rec_hdr& h, bool& lowi, rcvdat& rd,
+ 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);
Modified: store/trunk/cpp/lib/jrnl/jdir.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jdir.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jdir.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -368,7 +368,7 @@
return std::string(dn.str());
}
-const bool
+bool
jdir::is_dir(const char* name)
{
struct stat s;
@@ -381,13 +381,13 @@
return S_ISDIR(s.st_mode);
}
-const bool
+bool
jdir::is_dir(const std::string& name)
{
return is_dir(name.c_str());
}
-const bool
+bool
jdir::exists(const char* name)
{
struct stat s;
@@ -403,7 +403,7 @@
return true;
}
-const bool
+bool
jdir::exists(const std::string& name)
{
return exists(name.c_str());
Modified: store/trunk/cpp/lib/jrnl/jdir.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jdir.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jdir.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -264,7 +264,7 @@
* otherwise.
* \exception The stat() operation failed on the named file.
*/
- const static bool is_dir(const char* name);
+ static bool is_dir(const char* name);
/**
* \brief Test whether the named file is a directory.
@@ -274,7 +274,7 @@
* otherwise.
* \exception The stat() operation failed on the named file.
*/
- const static bool is_dir(const std::string& name);
+ static bool is_dir(const std::string& name);
/**
@@ -289,7 +289,7 @@
* otherwise.
* \exception The stat() operation failed on the named entity.
*/
- const static bool exists(const char* name);
+ static bool exists(const char* name);
/**
* \brief Test whether the named entity exists on the filesystem.
@@ -303,7 +303,7 @@
* otherwise.
* \exception The stat() operation failed on the named entity.
*/
- const static bool exists(const std::string& name);
+ static bool exists(const std::string& name);
public:
Modified: store/trunk/cpp/lib/jrnl/jexception.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jexception.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jexception.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -103,7 +103,7 @@
virtual ~jexception() throw ();
virtual const char* what() const throw (); // override std::exception::what()
- inline const u_int32_t err_code() const throw () { return _err_code; }
+ inline u_int32_t err_code() const throw () { return _err_code; }
inline const std::string additional_info() const throw () { return _additional_info; }
inline const std::string throwing_class() const throw () { return _throwing_class; }
inline const std::string throwing_fn() const throw () { return _throwing_fn; }
Modified: store/trunk/cpp/lib/jrnl/jinf.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jinf.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -155,7 +155,7 @@
_valid_flag = true;
}
-const u_int16_t
+u_int16_t
jinf::analyze()
{
u_int16_t ffid = 0xffff;
@@ -216,7 +216,7 @@
of.close();
}
-const u_int16_t
+u_int16_t
jinf::get_start_file()
{
if (!_analyzed_flag)
@@ -224,7 +224,7 @@
return _start_file;
}
-const u_int16_t
+u_int16_t
jinf::get_end_file()
{
if (!_analyzed_flag)
@@ -232,7 +232,7 @@
return _end_file;
}
-const bool
+bool
jinf::get_initial_owi()
{
if (!_analyzed_flag)
@@ -240,7 +240,7 @@
return _initial_owi;
}
-const bool
+bool
jinf::get_frot()
{
if (!_analyzed_flag)
@@ -360,13 +360,13 @@
jinfs.close();
}
-const u_int16_t
+u_int16_t
jinf::u_int16_value(char* line) const
{
return ::atoi(find_value(line));
}
-const u_int32_t
+u_int32_t
jinf::u_int32_value(char* line) const
{
return ::atol(find_value(line));
Modified: store/trunk/cpp/lib/jrnl/jinf.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jinf.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jinf.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -75,34 +75,34 @@
virtual ~jinf();
void validate();
- const u_int16_t analyze();
+ u_int16_t analyze();
void write();
- inline const u_int8_t jver() const { return _jver; }
+ inline u_int8_t jver() const { return _jver; }
inline const std::string& jid() const { return _jid; }
inline const std::string& jdir() const { return _jdir; }
inline const std::string& base_filename() const { return _base_filename; }
inline const timespec& ts() const { return _ts; }
- inline const u_int16_t num_jfiles() const { return _num_jfiles; }
- inline const u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
- inline const u_int16_t sblk_size_dblks() const { return _sblk_size_dblks; }
- inline const u_int32_t dblk_size() const { return _dblk_size; }
- inline const u_int32_t wmgr_page_size_dblks() const { return _wmgr_page_size_dblks; }
- inline const u_int32_t wmgr_num_pages() const { return _wmgr_num_pages; }
- inline const u_int32_t rmgr_page_size_dblks() const { return _rmgr_page_size_dblks; }
- inline const u_int32_t rmgr_num_pages() const { return _rmgr_num_pages; }
- const u_int16_t get_start_file();
- const u_int16_t get_end_file();
- const bool get_initial_owi();
- const bool get_frot();
+ inline u_int16_t num_jfiles() const { return _num_jfiles; }
+ inline u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
+ inline u_int16_t sblk_size_dblks() const { return _sblk_size_dblks; }
+ inline u_int32_t dblk_size() const { return _dblk_size; }
+ inline u_int32_t wmgr_page_size_dblks() const { return _wmgr_page_size_dblks; }
+ inline u_int32_t wmgr_num_pages() const { return _wmgr_num_pages; }
+ inline u_int32_t rmgr_page_size_dblks() const { return _rmgr_page_size_dblks; }
+ inline u_int32_t rmgr_num_pages() const { return _rmgr_num_pages; }
+ u_int16_t get_start_file();
+ u_int16_t get_end_file();
+ bool get_initial_owi();
+ bool get_frot();
const std::string to_string() const;
const std::string xml_str() const;
private:
void read(const std::string& jinf_filename);
- const u_int16_t u_int16_value(char* line) const;
- const u_int32_t u_int32_value(char* line) const;
+ u_int16_t u_int16_value(char* line) const;
+ u_int32_t u_int32_value(char* line) const;
const std::string& string_value(std::string& str, char* line) const;
const char* find_value(char* line) const;
};
Modified: store/trunk/cpp/lib/jrnl/jrec.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/jrec.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/jrec.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -115,7 +115,7 @@
* \param max_size_dblks Maximum number of data-blocks to write to pointer wptr.
* \returns Number of data-blocks encoded.
*/
- virtual const u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks,
+ virtual u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks,
u_int32_t max_size_dblks) = 0;
/**
@@ -148,21 +148,21 @@
* \param max_size_dblks Maximum number of data-blocks to read from pointer rptr.
* \returns Number of data-blocks read (consumed).
*/
- virtual const u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
+ virtual u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
u_int32_t max_size_dblks) = 0;
- virtual const bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs) = 0;
+ virtual bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs) = 0;
virtual std::string& str(std::string& str) const = 0;
- virtual const size_t data_size() const = 0;
- virtual const size_t xid_size() const = 0;
- virtual const size_t rec_size() const = 0;
- inline virtual const u_int32_t rec_size_dblks() const { return size_dblks(rec_size()); }
- static inline const u_int32_t size_dblks(const size_t size)
+ virtual size_t data_size() const = 0;
+ virtual size_t xid_size() const = 0;
+ virtual size_t rec_size() const = 0;
+ inline virtual u_int32_t rec_size_dblks() const { return size_dblks(rec_size()); }
+ static inline u_int32_t size_dblks(const size_t size)
{ return size_blks(size, JRNL_DBLK_SIZE); }
- static inline const u_int32_t size_sblks(const size_t size)
+ static inline u_int32_t size_sblks(const size_t size)
{ return size_blks(size, JRNL_DBLK_SIZE * JRNL_SBLK_SIZE); }
- static inline const u_int32_t size_blks(const size_t size, const size_t blksize)
+ static inline u_int32_t size_blks(const size_t size, const size_t blksize)
{ return (size + blksize - 1)/blksize; }
protected:
Modified: store/trunk/cpp/lib/jrnl/nlfh.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/nlfh.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -236,14 +236,14 @@
return true;
}
-const u_int32_t
+u_int32_t
nlfh::add_enqcnt(u_int32_t a)
{
_rec_enqcnt += a;
return _rec_enqcnt;
}
-const u_int32_t
+u_int32_t
nlfh::decr_enqcnt()
{
if (_rec_enqcnt == 0)
@@ -251,7 +251,7 @@
return --_rec_enqcnt;
}
-const u_int32_t
+u_int32_t
nlfh::subtr_enqcnt(u_int32_t s)
{
if (_rec_enqcnt < s)
@@ -264,7 +264,7 @@
return _rec_enqcnt;
}
-const u_int32_t
+u_int32_t
nlfh::add_rd_subm_cnt_dblks(u_int32_t a)
{
if (_rd_subm_cnt_dblks + a > _wr_subm_cnt_dblks)
@@ -278,7 +278,7 @@
return _rd_subm_cnt_dblks;
}
-const u_int32_t
+u_int32_t
nlfh::add_rd_cmpl_cnt_dblks(u_int32_t a)
{
if (_rd_cmpl_cnt_dblks + a > _rd_subm_cnt_dblks)
@@ -293,7 +293,7 @@
return _rd_cmpl_cnt_dblks;
}
-const u_int32_t
+u_int32_t
nlfh::add_wr_subm_cnt_dblks(u_int32_t a)
{
if (_wr_subm_cnt_dblks + a > _ffull_dblks) // Allow for file header
@@ -308,7 +308,7 @@
return _wr_subm_cnt_dblks;
}
-const u_int32_t
+u_int32_t
nlfh::add_wr_cmpl_cnt_dblks(u_int32_t a)
{
if (_wr_cmpl_cnt_dblks + a > _wr_subm_cnt_dblks)
@@ -323,7 +323,7 @@
return _wr_cmpl_cnt_dblks;
}
-const u_int16_t
+u_int16_t
nlfh::decr_aio_cnt()
{
if(_aio_cnt == 0)
Modified: store/trunk/cpp/lib/jrnl/nlfh.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/nlfh.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -80,57 +80,57 @@
virtual bool reset(const rcvdat* const ro = 0);
inline const std::string& fname() const { return _fname; }
- inline const u_int16_t fid() const { return _fid; }
- inline const int rd_fh() const { return _rd_fh; }
- inline const int wr_fh() const { return _wr_fh; }
- inline const u_int32_t enqcnt() const { return _rec_enqcnt; }
- inline const u_int32_t incr_enqcnt() { return ++_rec_enqcnt; }
- const u_int32_t add_enqcnt(u_int32_t a);
- const u_int32_t decr_enqcnt();
- const u_int32_t subtr_enqcnt(u_int32_t s);
+ inline u_int16_t fid() const { return _fid; }
+ inline int rd_fh() const { return _rd_fh; }
+ inline int wr_fh() const { return _wr_fh; }
+ inline u_int32_t enqcnt() const { return _rec_enqcnt; }
+ inline u_int32_t incr_enqcnt() { return ++_rec_enqcnt; }
+ u_int32_t add_enqcnt(u_int32_t a);
+ u_int32_t decr_enqcnt();
+ u_int32_t subtr_enqcnt(u_int32_t s);
- inline const u_int32_t rd_subm_cnt_dblks() const { return _rd_subm_cnt_dblks; }
- inline const size_t rd_subm_offs() const { return _rd_subm_cnt_dblks * JRNL_DBLK_SIZE; }
- const u_int32_t add_rd_subm_cnt_dblks(u_int32_t a);
+ inline u_int32_t rd_subm_cnt_dblks() const { return _rd_subm_cnt_dblks; }
+ inline size_t rd_subm_offs() const { return _rd_subm_cnt_dblks * JRNL_DBLK_SIZE; }
+ u_int32_t add_rd_subm_cnt_dblks(u_int32_t a);
- inline const u_int32_t rd_cmpl_cnt_dblks() const { return _rd_cmpl_cnt_dblks; }
- inline const size_t rd_cmpl_offs() const { return _rd_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
- const u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a);
+ inline u_int32_t rd_cmpl_cnt_dblks() const { return _rd_cmpl_cnt_dblks; }
+ inline size_t rd_cmpl_offs() const { return _rd_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
+ u_int32_t add_rd_cmpl_cnt_dblks(u_int32_t a);
- inline const u_int32_t wr_subm_cnt_dblks() const { return _wr_subm_cnt_dblks; }
- inline const size_t wr_subm_offs() const { return _wr_subm_cnt_dblks * JRNL_DBLK_SIZE; }
- const u_int32_t add_wr_subm_cnt_dblks(u_int32_t a);
+ inline u_int32_t wr_subm_cnt_dblks() const { return _wr_subm_cnt_dblks; }
+ inline size_t wr_subm_offs() const { return _wr_subm_cnt_dblks * JRNL_DBLK_SIZE; }
+ u_int32_t add_wr_subm_cnt_dblks(u_int32_t a);
- inline const u_int32_t wr_cmpl_cnt_dblks() const { return _wr_cmpl_cnt_dblks; }
- inline const size_t wr_cmpl_offs() const { return _wr_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
- const u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a);
+ inline u_int32_t wr_cmpl_cnt_dblks() const { return _wr_cmpl_cnt_dblks; }
+ inline size_t wr_cmpl_offs() const { return _wr_cmpl_cnt_dblks * JRNL_DBLK_SIZE; }
+ u_int32_t add_wr_cmpl_cnt_dblks(u_int32_t a);
- inline const u_int16_t aio_cnt() const { return _aio_cnt; }
- inline const u_int16_t incr_aio_cnt() { return ++_aio_cnt; }
- const u_int16_t decr_aio_cnt();
+ inline u_int16_t aio_cnt() const { return _aio_cnt; }
+ inline u_int16_t incr_aio_cnt() { return ++_aio_cnt; }
+ u_int16_t decr_aio_cnt();
// Derived helper functions
- inline const bool rd_void() const { return _wr_cmpl_cnt_dblks == 0; }
- inline const bool rd_empty() const { return _wr_cmpl_cnt_dblks <= JRNL_SBLK_SIZE; }
- inline const u_int32_t rd_remaining_dblks() const
+ inline bool rd_void() const { return _wr_cmpl_cnt_dblks == 0; }
+ inline bool rd_empty() const { return _wr_cmpl_cnt_dblks <= JRNL_SBLK_SIZE; }
+ inline u_int32_t rd_remaining_dblks() const
{ return _wr_cmpl_cnt_dblks - _rd_subm_cnt_dblks; }
- inline const bool is_rd_full() const { return _wr_cmpl_cnt_dblks == _rd_subm_cnt_dblks; }
- inline const bool is_rd_compl() const
+ inline bool is_rd_full() const { return _wr_cmpl_cnt_dblks == _rd_subm_cnt_dblks; }
+ inline bool is_rd_compl() const
{ return _wr_cmpl_cnt_dblks == _rd_cmpl_cnt_dblks; }
- inline const u_int32_t rd_aio_outstanding_dblks() const
+ inline u_int32_t rd_aio_outstanding_dblks() const
{ return _rd_subm_cnt_dblks - _rd_cmpl_cnt_dblks; }
- inline const bool rd_file_rotate() const { return is_rd_full() && is_wr_compl(); }
+ inline bool rd_file_rotate() const { return is_rd_full() && is_wr_compl(); }
- inline const bool wr_void() const { return _wr_subm_cnt_dblks == 0; }
- inline const bool wr_empty() const { return _wr_subm_cnt_dblks <= JRNL_SBLK_SIZE; }
- inline const u_int32_t wr_remaining_dblks() const
+ inline bool wr_void() const { return _wr_subm_cnt_dblks == 0; }
+ inline bool wr_empty() const { return _wr_subm_cnt_dblks <= JRNL_SBLK_SIZE; }
+ inline u_int32_t wr_remaining_dblks() const
{ return _ffull_dblks - _wr_subm_cnt_dblks; }
- inline const bool is_wr_full() const { return _ffull_dblks == _wr_subm_cnt_dblks; }
- inline const bool is_wr_compl() const { return _ffull_dblks == _wr_cmpl_cnt_dblks; }
- inline const u_int32_t wr_aio_outstanding_dblks() const
+ inline bool is_wr_full() const { return _ffull_dblks == _wr_subm_cnt_dblks; }
+ inline bool is_wr_compl() const { return _ffull_dblks == _wr_cmpl_cnt_dblks; }
+ inline u_int32_t wr_aio_outstanding_dblks() const
{ return _wr_subm_cnt_dblks - _wr_cmpl_cnt_dblks; }
- inline const bool wr_file_rotate() const { return is_wr_full(); }
+ inline bool wr_file_rotate() const { return is_wr_full(); }
// Debug aid
const std::string status_str() const;
Modified: store/trunk/cpp/lib/jrnl/pmgr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/pmgr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/pmgr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -120,8 +120,8 @@
const u_int16_t pages);
virtual ~pmgr();
- virtual const u_int32_t get_events(page_state state) = 0;
- inline const u_int32_t get_aio_evt_rem() const { return _aio_evt_rem; }
+ virtual u_int32_t get_events(page_state state) = 0;
+ inline u_int32_t get_aio_evt_rem() const { return _aio_evt_rem; }
static const char* page_state_str(page_state ps);
protected:
Modified: store/trunk/cpp/lib/jrnl/rec_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rec_hdr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/rec_hdr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -120,7 +120,7 @@
_rid = 0;
}
- inline const bool get_owi() const { return _uflag & HDR_OVERWRITE_INDICATOR_MASK; }
+ inline bool get_owi() const { return _uflag & HDR_OVERWRITE_INDICATOR_MASK; }
inline void set_owi(const bool owi)
{
@@ -131,7 +131,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(rec_hdr); }
+ inline static size_t size() { return sizeof(rec_hdr); }
}; // struct rec_hdr
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/rec_tail.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rec_tail.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/rec_tail.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -87,7 +87,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(rec_tail); }
+ inline static size_t size() { return sizeof(rec_tail); }
};
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/rmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rmgr.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/rmgr.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -100,7 +100,7 @@
}
}
-const iores
+iores
rmgr::read(void** const datapp, size_t& dsize, void** const xidpp, size_t& xidsize, bool& transient,
bool& external, data_tok* dtokp)
{
@@ -262,7 +262,7 @@
}
}
-const u_int32_t
+u_int32_t
rmgr::get_events(page_state state)
{
int ret = 0;
@@ -361,7 +361,7 @@
pmgr::initialize();
}
-const iores
+iores
rmgr::pre_read_check(data_tok* dtokp)
{
if (_aio_evt_rem)
@@ -405,7 +405,7 @@
return RHM_IORES_SUCCESS;
}
-const iores
+iores
rmgr::read_enq(rec_hdr& h, void* rptr, data_tok* dtokp)
{
if (_page_cb_arr[_pg_index]._state != AIO_COMPLETE)
@@ -493,7 +493,7 @@
rotate_page();
}
-const iores
+iores
rmgr::skip(data_tok* dtokp)
{
u_int32_t dsize_dblks = jrec::size_dblks(dtokp->dsize());
@@ -650,7 +650,7 @@
_pg_cntr = 0;
}
-const u_int32_t
+u_int32_t
rmgr::dblks_rem() const
{
return _page_cb_arr[_pg_index]._rdblks - _pg_offset_dblks;
Modified: store/trunk/cpp/lib/jrnl/rmgr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rmgr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/rmgr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -75,11 +75,11 @@
virtual ~rmgr();
void initialize(const rd_aio_cb rd_cb, const size_t fro);
- const iores read(void** const datapp, size_t& dsize, void** const xidpp, size_t& xidsize,
+ iores read(void** const datapp, size_t& dsize, void** const xidpp, size_t& xidsize,
bool& transient, bool& external, data_tok* dtokp);
- const u_int32_t get_events(page_state state = AIO_COMPLETE);
+ u_int32_t get_events(page_state state = AIO_COMPLETE);
void recover_complete(size_t fro);
- inline const bool is_valid() const {return _valid; }
+ inline bool is_valid() const {return _valid; }
inline void synchronize() { if (!_valid) aio_cycle(); }
void invalidate();
@@ -92,16 +92,16 @@
private:
void initialize();
void clean();
- const iores pre_read_check(data_tok* dtokp);
- const iores read_enq(rec_hdr& h, void* rptr, data_tok* dtokp);
+ iores pre_read_check(data_tok* dtokp);
+ iores read_enq(rec_hdr& h, void* rptr, data_tok* dtokp);
void consume_xid_rec(rec_hdr& h, void* rptr, data_tok* dtokp);
void consume_filler();
- const iores skip(data_tok* dtokp);
+ iores skip(data_tok* dtokp);
void aio_cycle();
void init_aio_reads(const int16_t first_uninit, const u_int16_t num_uninit);
void consume_fhdr();
void rotate_page();
- const u_int32_t dblks_rem() const;
+ u_int32_t dblks_rem() const;
void set_params_null(void** const datapp, size_t& dsize, void** const xidpp,
size_t& xidsize);
void init_file_header_read(u_int16_t fid);
Modified: store/trunk/cpp/lib/jrnl/rrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rrfc.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/rrfc.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -85,7 +85,7 @@
* \brief Returns the index of the currently active file within the rotating
* file group.
*/
- inline const u_int16_t index() const { return _fh_index; }
+ inline u_int16_t index() const { return _fh_index; }
/**
* \brief Returns the currently active journal file handle within the rotating
@@ -101,37 +101,37 @@
// Convenience access methods to current file handle
- inline const u_int16_t fid() const { return _curr_fh->fid(); }
- inline const int fh() const { return _curr_fh->rd_fh(); }
- inline const u_int32_t enqcnt() const { return _curr_fh->enqcnt(); }
- inline const u_int32_t incr_enqcnt() { return _curr_fh->incr_enqcnt(); }
- inline const u_int32_t incr_enqcnt(u_int16_t fid) { return _fh_arr[fid]->incr_enqcnt(); }
- inline const u_int32_t add_enqcnt(u_int32_t a) { return _curr_fh->add_enqcnt(a); }
- inline const u_int32_t add_enqcnt(u_int16_t fid, u_int32_t a)
+ inline u_int16_t fid() const { return _curr_fh->fid(); }
+ inline int fh() const { return _curr_fh->rd_fh(); }
+ inline u_int32_t enqcnt() const { return _curr_fh->enqcnt(); }
+ inline u_int32_t incr_enqcnt() { return _curr_fh->incr_enqcnt(); }
+ inline u_int32_t incr_enqcnt(u_int16_t fid) { return _fh_arr[fid]->incr_enqcnt(); }
+ inline u_int32_t add_enqcnt(u_int32_t a) { return _curr_fh->add_enqcnt(a); }
+ inline u_int32_t add_enqcnt(u_int16_t fid, u_int32_t a)
{ return _fh_arr[fid]->add_enqcnt(a); }
- inline const u_int32_t decr_enqcnt(u_int16_t fid) { return _fh_arr[fid]->decr_enqcnt(); }
- inline const u_int32_t subtr_enqcnt(u_int16_t fid, u_int32_t s)
+ inline u_int32_t decr_enqcnt(u_int16_t fid) { return _fh_arr[fid]->decr_enqcnt(); }
+ inline u_int32_t subtr_enqcnt(u_int16_t fid, u_int32_t s)
{ return _fh_arr[fid]->subtr_enqcnt(s); }
- inline const u_int32_t subm_cnt_dblks() const { return _curr_fh->rd_subm_cnt_dblks(); }
- inline const size_t subm_offs() const { return _curr_fh->rd_subm_offs(); }
- inline const u_int32_t add_subm_cnt_dblks(u_int32_t a)
+ inline u_int32_t subm_cnt_dblks() const { return _curr_fh->rd_subm_cnt_dblks(); }
+ inline size_t subm_offs() const { return _curr_fh->rd_subm_offs(); }
+ inline u_int32_t add_subm_cnt_dblks(u_int32_t a)
{ return _curr_fh->add_rd_subm_cnt_dblks(a); }
- inline const u_int32_t cmpl_cnt_dblks() const { return _curr_fh->rd_cmpl_cnt_dblks(); }
- inline const size_t cmpl_offs() const { return _curr_fh->rd_cmpl_offs(); }
- inline const u_int32_t add_cmpl_cnt_dblks(u_int32_t a)
+ inline u_int32_t cmpl_cnt_dblks() const { return _curr_fh->rd_cmpl_cnt_dblks(); }
+ inline size_t cmpl_offs() const { return _curr_fh->rd_cmpl_offs(); }
+ inline u_int32_t add_cmpl_cnt_dblks(u_int32_t a)
{ return _curr_fh->add_rd_cmpl_cnt_dblks(a); }
- inline const bool is_void() const { return _curr_fh->rd_void(); }
- inline const bool is_empty() const { return _curr_fh->rd_empty(); }
- inline const u_int32_t remaining_dblks() { return _curr_fh->rd_remaining_dblks(); }
- inline const bool is_full() const { return _curr_fh->is_rd_full(); }
- inline const bool is_compl() const { return _curr_fh->is_rd_compl(); }
- inline const u_int32_t aio_outstanding_dblks() const
+ inline bool is_void() const { return _curr_fh->rd_void(); }
+ inline bool is_empty() const { return _curr_fh->rd_empty(); }
+ inline u_int32_t remaining_dblks() { return _curr_fh->rd_remaining_dblks(); }
+ inline bool is_full() const { return _curr_fh->is_rd_full(); }
+ inline bool is_compl() const { return _curr_fh->is_rd_compl(); }
+ inline u_int32_t aio_outstanding_dblks() const
{ return _curr_fh->rd_aio_outstanding_dblks(); }
- inline const bool file_rotate() const { return _curr_fh->rd_file_rotate(); }
- inline const bool is_wr_aio_outstanding() const
+ inline bool file_rotate() const { return _curr_fh->rd_file_rotate(); }
+ inline bool is_wr_aio_outstanding() const
{ return _curr_fh->wr_aio_outstanding_dblks() > 0; }
// Debug aid
Modified: store/trunk/cpp/lib/jrnl/txn_hdr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_hdr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/txn_hdr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -115,7 +115,7 @@
/**
* \brief Returns the size of the header in bytes.
*/
- inline static const size_t size() { return sizeof(txn_hdr); }
+ inline static size_t size() { return sizeof(txn_hdr); }
};
#pragma pack()
Modified: store/trunk/cpp/lib/jrnl/txn_map.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_map.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/txn_map.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -61,7 +61,7 @@
pthread_mutex_destroy(&_mutex);
}
-const bool
+bool
txn_map::insert_txn_data(const std::string& xid, const txn_data& td)
{
bool ok = true;
@@ -114,7 +114,7 @@
return list;
}
-const bool
+bool
txn_map::in_map(const std::string& xid)
{
xmap_itr itr;
@@ -127,7 +127,7 @@
return true;
}
-const u_int32_t
+u_int32_t
txn_map::get_rid_count(const std::string& xid)
{
xmap_itr itr;
@@ -144,7 +144,7 @@
return itr->second.size();
}
-const bool
+bool
txn_map::is_txn_synced(const std::string& xid)
{
slock s(&_mutex);
@@ -167,7 +167,7 @@
return is_synced;
}
-const bool
+bool
txn_map::set_aio_compl(const std::string& xid, const u_int64_t rid)
{
bool ok = true;
Modified: store/trunk/cpp/lib/jrnl/txn_map.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_map.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/txn_map.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -118,17 +118,17 @@
txn_map();
virtual ~txn_map();
- const bool insert_txn_data(const std::string& xid, const txn_data& td);
+ bool insert_txn_data(const std::string& xid, const txn_data& td);
const txn_data_list get_tdata_list(const std::string& xid);
const txn_data_list get_remove_tdata_list(const std::string& xid);
- const bool in_map(const std::string& xid);
- const u_int32_t get_rid_count(const std::string& xid);
- const bool is_txn_synced(const std::string& xid);
- const bool set_aio_compl(const std::string& xid, const u_int64_t rid);
+ bool in_map(const std::string& xid);
+ u_int32_t get_rid_count(const std::string& xid);
+ bool is_txn_synced(const std::string& xid);
+ bool set_aio_compl(const std::string& xid, const u_int64_t rid);
const txn_data& get_data(const std::string& xid, const u_int64_t rid);
inline void clear() { _map.clear(); }
- inline const bool empty() const { return _map.empty(); }
- inline const u_int16_t size() const { return (u_int16_t)_map.size(); }
+ inline bool empty() const { return _map.empty(); }
+ inline u_int16_t size() const { return (u_int16_t)_map.size(); }
void xid_list(std::vector<std::string>& xv);
private:
static std::string xid_format(const std::string& xid);
Modified: store/trunk/cpp/lib/jrnl/txn_rec.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/txn_rec.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -90,7 +90,7 @@
_txn_tail._rid = rid;
}
-const u_int32_t
+u_int32_t
txn_rec::encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(wptr != 0);
@@ -198,7 +198,7 @@
return size_dblks(wr_cnt);
}
-const u_int32_t
+u_int32_t
txn_rec::decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks)
{
assert(rptr != 0);
@@ -309,7 +309,7 @@
return size_dblks(rd_cnt);
}
-const bool
+bool
txn_rec::rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs)
{
if (rec_offs == 0)
@@ -358,7 +358,7 @@
return true;
}
-const size_t
+size_t
txn_rec::get_xid(void** const xidpp)
{
if (!_buff)
@@ -385,13 +385,13 @@
return str;
}
-const size_t
+size_t
txn_rec::xid_size() const
{
return _txn_hdr._xidsize;
}
-const size_t
+size_t
txn_rec::rec_size() const
{
return txn_hdr::size() + _txn_hdr._xidsize + rec_tail::size();
Modified: store/trunk/cpp/lib/jrnl/txn_rec.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/txn_rec.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/txn_rec.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -74,17 +74,17 @@
// Prepare instance for use in writing data to journal
void reset(const u_int32_t magic, const u_int64_t rid, const void* const xidp,
const size_t xidlen, const bool owi);
- const u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
- const u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
+ u_int32_t encode(void* wptr, u_int32_t rec_offs_dblks, u_int32_t max_size_dblks);
+ u_int32_t decode(rec_hdr& h, void* rptr, u_int32_t rec_offs_dblks,
u_int32_t max_size_dblks);
// Decode used for recover
- const bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
+ bool rcv_decode(rec_hdr h, std::ifstream* ifsp, size_t& rec_offs);
- const size_t get_xid(void** const xidpp);
+ size_t get_xid(void** const xidpp);
std::string& str(std::string& str) const;
- inline const size_t data_size() const { return 0; } // This record never carries data
- const size_t xid_size() const;
- const size_t rec_size() const;
+ inline size_t data_size() const { return 0; } // This record never carries data
+ size_t xid_size() const;
+ size_t rec_size() const;
private:
void chk_hdr() const;
Modified: store/trunk/cpp/lib/jrnl/wmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -112,7 +112,7 @@
}
}
-const iores
+iores
wmgr::enqueue(const void* const data_buff, const size_t tot_data_len, const size_t this_data_len,
data_tok* dtokp, const void* const xid_ptr, const size_t xid_len, const bool transient,
const bool external)
@@ -251,7 +251,7 @@
return res;
}
-const iores
+iores
wmgr::dequeue(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len)
{
if (xid_len)
@@ -394,7 +394,7 @@
return res;
}
-const iores
+iores
wmgr::abort(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len)
{
// commit and abort MUST have a valid xid
@@ -535,7 +535,7 @@
return res;
}
-const iores
+iores
wmgr::commit(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len)
{
// commit and abort MUST have a valid xid
@@ -672,7 +672,7 @@
return res;
}
-const iores
+iores
wmgr::flush()
{
iores res = write_flush();
@@ -685,7 +685,7 @@
return res;
}
-const iores
+iores
wmgr::write_flush()
{
iores res = RHM_IORES_SUCCESS;
@@ -736,7 +736,7 @@
return res;
}
-const iores
+iores
wmgr::rotate_file()
{
_pg_cntr = 0;
@@ -745,7 +745,7 @@
return res;
}
-const u_int32_t
+u_int32_t
wmgr::get_events(page_state state)
{
int ret = 0;
@@ -888,7 +888,7 @@
return tot_data_toks;
}
-const bool
+bool
wmgr::is_txn_synced(const std::string& xid)
{
bool is_synced = true;
@@ -934,7 +934,7 @@
_enq_busy = false;
}
-const iores
+iores
wmgr::pre_write_check(const _op_type op, const data_tok* const dtokp,
#if defined(RHM_WRONLY)
const size_t /*xidsize*/, const size_t /*dsize*/, const bool /*external*/
Modified: store/trunk/cpp/lib/jrnl/wmgr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/wmgr.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -105,31 +105,30 @@
void initialize(wr_aio_cb wr_cb, const u_int32_t max_dtokpp, const u_int32_t max_iowait_us,
size_t eo = 0);
- const iores enqueue(const void* const data_buff, const size_t tot_data_len,
+ iores enqueue(const void* const data_buff, const size_t tot_data_len,
const size_t this_data_len, data_tok* dtokp, const void* const xid_ptr,
const size_t xid_len, const bool transient, const bool external);
- const iores dequeue(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
- const iores abort(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
- const iores commit(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
- const iores flush();
- const u_int32_t get_events(page_state state);
- const bool is_txn_synced(const std::string& xid);
- inline const bool curr_pg_blocked() const
- { return _page_cb_arr[_pg_index]._state != UNUSED; }
- inline const bool curr_file_blocked() const { return _wrfc.aio_cnt() > 0; }
- inline const u_int32_t unflushed_dblks() { return _cached_offset_dblks; }
+ iores dequeue(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
+ iores abort(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
+ iores commit(data_tok* dtokp, const void* const xid_ptr, const size_t xid_len);
+ iores flush();
+ u_int32_t get_events(page_state state);
+ bool is_txn_synced(const std::string& xid);
+ inline bool curr_pg_blocked() const { return _page_cb_arr[_pg_index]._state != UNUSED; }
+ inline bool curr_file_blocked() const { return _wrfc.aio_cnt() > 0; }
+ inline u_int32_t unflushed_dblks() { return _cached_offset_dblks; }
// Debug aid
const std::string status_str() const;
private:
void initialize();
- const iores pre_write_check(const _op_type op, const data_tok* const dtokp,
+ iores pre_write_check(const _op_type op, const data_tok* const dtokp,
const size_t xidsize = 0, const size_t dsize = 0, const bool external = false)
const;
void dequeue_check(const std::string& xid, const u_int64_t drid);
- const iores write_flush();
- const iores rotate_file();
+ iores write_flush();
+ iores rotate_file();
void dblk_roundup();
void write_fhdr(u_int64_t rid, u_int32_t fid, size_t fro);
void rotate_page();
Modified: store/trunk/cpp/lib/jrnl/wrfc.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wrfc.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/wrfc.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -86,7 +86,7 @@
_enq_cap_offs_dblks = _fsize_dblks;
}
-const iores
+iores
wrfc::rotate()
{
if (!_nfiles)
@@ -106,7 +106,7 @@
return RHM_IORES_SUCCESS;
}
-const u_int16_t
+u_int16_t
wrfc::earliest_index() const
{
if (_frot)
@@ -117,7 +117,7 @@
return next_index;
}
-const bool
+bool
wrfc::reset()
{
_reset_ok = _curr_fh->reset(); // returns false if full (ie file still contains enqueued recs)
@@ -142,7 +142,7 @@
* These files must be free of enqueues
* If not, return true.
*/
-const bool
+bool
wrfc::enq_threshold(const u_int32_t enq_dsize_dblks) const
{
u_int32_t subm_dblks = subm_cnt_dblks(); // includes file hdr if > 0
Modified: store/trunk/cpp/lib/jrnl/wrfc.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wrfc.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/lib/jrnl/wrfc.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -82,49 +82,49 @@
* \brief Rotate active file handle to next file in rotating file group.
* \exception jerrno::JERR__NINIT if called before calling initialize().
*/
- const iores rotate();
+ iores rotate();
/**
* \brief Returns the index of the earliest complete file within the rotating
* file group. Unwritten files are excluded. The currently active file is
* excluded unless it is the only written file.
*/
- const u_int16_t earliest_index() const;
+ u_int16_t earliest_index() const;
- inline const u_int64_t rid() const { return _rid; }
- inline const u_int64_t get_incr_rid() { return _rid++; }
- const bool reset();
- inline const bool is_reset() const { return _reset_ok; }
- inline const bool owi() const { return _owi; }
- inline const bool frot() const { return _frot; }
+ inline u_int64_t rid() const { return _rid; }
+ inline u_int64_t get_incr_rid() { return _rid++; }
+ bool reset();
+ inline bool is_reset() const { return _reset_ok; }
+ inline bool owi() const { return _owi; }
+ inline bool frot() const { return _frot; }
// Convenience access methods to current file handle
- inline const int fh() const { return _curr_fh->wr_fh(); }
+ inline int fh() const { return _curr_fh->wr_fh(); }
- inline const u_int32_t subm_cnt_dblks() const { return _curr_fh->wr_subm_cnt_dblks(); }
- inline const size_t subm_offs() const { return _curr_fh->wr_subm_offs(); }
- inline const u_int32_t add_subm_cnt_dblks(u_int32_t a)
+ inline u_int32_t subm_cnt_dblks() const { return _curr_fh->wr_subm_cnt_dblks(); }
+ inline size_t subm_offs() const { return _curr_fh->wr_subm_offs(); }
+ inline u_int32_t add_subm_cnt_dblks(u_int32_t a)
{ return _curr_fh->add_wr_subm_cnt_dblks(a); }
- inline const u_int32_t cmpl_cnt_dblks() const { return _curr_fh->wr_cmpl_cnt_dblks(); }
- inline const size_t cmpl_offs() const { return _curr_fh->wr_cmpl_offs(); }
- inline const u_int32_t add_cmpl_cnt_dblks(u_int32_t a)
+ inline u_int32_t cmpl_cnt_dblks() const { return _curr_fh->wr_cmpl_cnt_dblks(); }
+ inline size_t cmpl_offs() const { return _curr_fh->wr_cmpl_offs(); }
+ inline u_int32_t add_cmpl_cnt_dblks(u_int32_t a)
{ return _curr_fh->add_wr_cmpl_cnt_dblks(a); }
- inline const u_int16_t aio_cnt() const { return _curr_fh->aio_cnt(); }
- inline const u_int16_t incr_aio_cnt() { return _curr_fh->incr_aio_cnt(); }
- inline const u_int16_t decr_aio_cnt() { return _curr_fh->decr_aio_cnt(); }
+ inline u_int16_t aio_cnt() const { return _curr_fh->aio_cnt(); }
+ inline u_int16_t incr_aio_cnt() { return _curr_fh->incr_aio_cnt(); }
+ inline u_int16_t decr_aio_cnt() { return _curr_fh->decr_aio_cnt(); }
- inline const bool is_void() const { return _curr_fh->wr_void(); }
- inline const bool is_empty() const { return _curr_fh->wr_empty(); }
- inline const u_int32_t remaining_dblks() const { return _curr_fh->wr_remaining_dblks(); }
- inline const bool is_full() const { return _curr_fh->is_wr_full(); };
- inline const bool is_compl() const { return _curr_fh->is_wr_compl(); };
- inline const u_int32_t aio_outstanding_dblks() const
+ inline bool is_void() const { return _curr_fh->wr_void(); }
+ inline bool is_empty() const { return _curr_fh->wr_empty(); }
+ inline u_int32_t remaining_dblks() const { return _curr_fh->wr_remaining_dblks(); }
+ inline bool is_full() const { return _curr_fh->is_wr_full(); };
+ inline bool is_compl() const { return _curr_fh->is_wr_compl(); };
+ inline u_int32_t aio_outstanding_dblks() const
{ return _curr_fh->wr_aio_outstanding_dblks(); }
- inline const bool file_rotate() const { return _curr_fh->wr_file_rotate(); }
- const bool enq_threshold(const u_int32_t enq_dsize_dblks) const;
+ inline bool file_rotate() const { return _curr_fh->wr_file_rotate(); }
+ bool enq_threshold(const u_int32_t enq_dsize_dblks) const;
// Debug aid
const std::string status_str() const;
Modified: store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/_st_helper_fns.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -55,7 +55,7 @@
return file + "." + test_name;
}
-const bool
+bool
check_iores(const string& ctxt, const iores ret, const iores exp_ret)
{
if (ret != exp_ret)
@@ -63,7 +63,7 @@
return false;
}
-const bool
+bool
handle_jcntl_response(const iores res, jcntl& jc, unsigned& aio_sleep_cnt, const std::string& ctxt,
const iores exp_ret)
{
@@ -95,7 +95,7 @@
jc.recover(num_jfiles, jfsize_sblks, 0, 0, txn_list, highest_rid);
}
-const u_int64_t
+u_int64_t
enq_msg(jcntl& jc, const u_int64_t rid, const string& msg, const bool transient,
const iores exp_ret = RHM_IORES_SUCCESS)
{
@@ -108,7 +108,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
enq_extern_msg(jcntl& jc, const u_int64_t rid, const size_t msg_size, const bool transient,
const iores exp_ret = RHM_IORES_SUCCESS)
{
@@ -120,7 +120,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
enq_txn_msg(jcntl& jc, const u_int64_t rid, const string& msg, const string& xid,
const bool transient, const iores exp_ret = RHM_IORES_SUCCESS)
{
@@ -133,7 +133,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
enq_extern_txn_msg(jcntl& jc, const u_int64_t rid, const size_t msg_size, const string& xid,
const bool transient, const iores exp_ret = RHM_IORES_SUCCESS)
{
@@ -146,7 +146,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
deq_msg(jcntl& jc, const u_int64_t drid, const iores exp_ret = RHM_IORES_SUCCESS)
{
ostringstream ctxt;
@@ -159,7 +159,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
deq_txn_msg(jcntl& jc, const u_int64_t drid, const string& xid,
const iores exp_ret = RHM_IORES_SUCCESS)
{
@@ -173,7 +173,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
txn_abort(jcntl& jc, const string& xid, const iores exp_ret = RHM_IORES_SUCCESS)
{
data_tok* dtp = new data_tok;
@@ -182,7 +182,7 @@
return dtp->rid();
}
-const u_int64_t
+u_int64_t
txn_commit(jcntl& jc, const string& xid, const iores exp_ret = RHM_IORES_SUCCESS)
{
data_tok* dtp = new data_tok;
@@ -222,7 +222,7 @@
}
-const u_int32_t
+u_int32_t
num_msgs_to_full(const u_int16_t num_files, const u_int32_t file_size_dblks,
const u_int32_t msg_rec_size_dblks, bool include_deq)
{
@@ -232,7 +232,7 @@
return u_int32_t(::floor(1.0 * num_files * file_size_dblks / rec_size_dblks));
}
-const u_int32_t
+u_int32_t
num_msgs_to_threshold(const u_int16_t num_files, const u_int32_t file_size_dblks,
const u_int32_t msg_rec_size_dblks)
{
@@ -240,7 +240,7 @@
msg_rec_size_dblks / 100));
}
-const u_int32_t
+u_int32_t
num_dequeues_rem(const u_int16_t num_files, const u_int32_t file_size_sblks)
{
return u_int32_t(::ceil(num_files * file_size_sblks * (1 - (1.0 * JRNL_ENQ_THRESHOLD / 100))));
Modified: store/trunk/cpp/tests/jrnl/jtt/args.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/args.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -83,7 +83,7 @@
"Seed for use in random number generator.");
}
-const bool
+bool
args::parse(int argc, char** argv) // return true if error, false if ok
{
get_jtt_path(argv[0]);
@@ -150,7 +150,7 @@
}
}
-const bool
+bool
args::usage() const
{
std::cout << _options_descr << std::endl;
Modified: store/trunk/cpp/tests/jrnl/jtt/args.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/args.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -55,9 +55,9 @@
unsigned seed;
args(std::string opt_title);
- const bool parse(int argc, char** argv); // return true if error, false if ok
+ bool parse(int argc, char** argv); // return true if error, false if ok
void get_jtt_path(const char* argv0);
- const bool usage() const; // return true
+ bool usage() const; // return true
void print_args() const;
void print_flags() const;
};
Modified: store/trunk/cpp/tests/jrnl/jtt/data_src.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/data_src.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/data_src.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -64,7 +64,7 @@
private:
data_src();
- static const u_int64_t get_xid_cnt() { rhm::journal::slock s(_m.m()); return _xid_cnt++; }
+ static u_int64_t get_xid_cnt() { rhm::journal::slock s(_m.m()); return _xid_cnt++; }
static const char* const get_xid_content(const size_t offs);
static bool __init();
};
Modified: store/trunk/cpp/tests/jrnl/jtt/jrnl_init_params.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/jrnl_init_params.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/jrnl_init_params.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -58,8 +58,8 @@
inline const std::string& jid() const { return _jid; }
inline const std::string& jdir() const { return _jdir; }
inline const std::string& base_filename() const { return _base_filename; }
- inline const u_int16_t num_jfiles() const { return _num_jfiles; }
- inline const u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
+ inline u_int16_t num_jfiles() const { return _num_jfiles; }
+ inline u_int32_t jfsize_sblks() const { return _jfsize_sblks; }
};
} // namespace jtt
Modified: store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/read_arg.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -36,7 +36,7 @@
const bool read_arg::init = __init();
// static init fn
-const bool
+bool
read_arg::__init()
{
// Set string versions of each enum option here
Modified: store/trunk/cpp/tests/jrnl/jtt/read_arg.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/read_arg.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/read_arg.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -40,13 +40,13 @@
static std::map<std::string, read_mode_t> _map;
static std::string _description;
static const bool init;
- static const bool __init();
+ static bool __init();
read_mode_t _rm;
public:
inline read_arg() : _rm(NONE) {}
inline read_arg(read_mode_t rm) : _rm(rm) {}
- inline const read_mode_t val() const { return _rm; }
+ inline read_mode_t val() const { return _rm; }
inline void set_val(const read_mode_t rm) { _rm = rm; }
void parse(const std::string& str);
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -52,7 +52,7 @@
test_case::~test_case()
{}
-const size_t
+size_t
test_case::this_data_size() const
{
if (_min_data_size == _max_data_size)
@@ -61,7 +61,7 @@
return _min_data_size + size_t(1.0 * ::rand() * size_diff/(RAND_MAX + 1.0));
}
-const size_t
+size_t
test_case::this_xid_size() const
{
// TODO: rework when probabilities are introduced. Assume 50% if _min_xid_size = 0
@@ -76,7 +76,7 @@
return _min_xid_size + size_t(1.0 * ::rand() * size_diff/(RAND_MAX + 1.0));
}
-const bool
+bool
test_case::this_transience() const
{
// TODO: rework when probabilities are introduced. Assume 50% if JTT_RANDOM
@@ -87,7 +87,7 @@
return 1.0 * ::rand() / RAND_MAX < 0.5;
}
-const bool
+bool
test_case::this_external() const
{
// TODO: rework when probabilities are introduced. Assume 50% if JDL_RANDOM
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -74,26 +74,26 @@
const external_t external, const std::string& comment);
~test_case();
- inline const unsigned test_case_num() const { return _test_case_num; }
- inline const u_int32_t num_msgs() const { return _num_msgs; }
- inline const size_t min_data_size() const { return _min_data_size; }
- inline const size_t max_data_size() const { return _max_data_size; }
- const size_t this_data_size() const;
- inline const bool auto_deq() const { return _auto_dequeue; }
- inline const size_t min_xid_size() const { return _min_xid_size; }
- inline const size_t max_xid_size() const { return _max_xid_size; }
- const size_t this_xid_size() const;
- inline const transient_t transient() const { return _transient; }
- const bool this_transience() const;
- inline const external_t external() const { return _external; }
- const bool this_external() const;
+ inline unsigned test_case_num() const { return _test_case_num; }
+ inline u_int32_t num_msgs() const { return _num_msgs; }
+ inline size_t min_data_size() const { return _min_data_size; }
+ inline size_t max_data_size() const { return _max_data_size; }
+ size_t this_data_size() const;
+ inline bool auto_deq() const { return _auto_dequeue; }
+ inline size_t min_xid_size() const { return _min_xid_size; }
+ inline size_t max_xid_size() const { return _max_xid_size; }
+ size_t this_xid_size() const;
+ inline transient_t transient() const { return _transient; }
+ bool this_transience() const;
+ inline external_t external() const { return _external; }
+ bool this_external() const;
inline const std::string& comment() const { return _comment; }
void add_result(test_case_result::shared_ptr& p);
void set_fmt_chk_res(const bool res, const std::string& jid);
inline const test_case_result_agregation& average() const { return _result_average; }
- inline const u_int32_t num_results() const { return _result_average.num_results(); }
+ inline u_int32_t num_results() const { return _result_average.num_results(); }
inline unsigned num_jrnls() const { return _result_jmap.size(); }
inline res_map_citr jrnl_average(std::string& jid) const { return _result_jmap.find(jid); }
inline res_map_citr jmap_begin() const { return _result_jmap.begin(); }
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case_result.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case_result.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case_result.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -60,14 +60,14 @@
virtual ~test_case_result();
inline const std::string& jid() const { return _jid; }
- inline const u_int32_t num_enq() const { return _num_enq; }
- inline const u_int32_t incr_num_enq() { return ++_num_enq; }
- inline const u_int32_t num_deq() const { return _num_deq; }
- inline const u_int32_t incr_num_deq() { return ++_num_deq; }
- inline const u_int32_t num_read() const { return _num_read; }
- inline const u_int32_t incr_num_read() { return ++_num_read; }
- inline const u_int32_t num_rproc() const { return _num_rproc; }
- inline const u_int32_t incr_num_rproc() { return ++_num_rproc; }
+ inline u_int32_t num_enq() const { return _num_enq; }
+ inline u_int32_t incr_num_enq() { return ++_num_enq; }
+ inline u_int32_t num_deq() const { return _num_deq; }
+ inline u_int32_t incr_num_deq() { return ++_num_deq; }
+ inline u_int32_t num_read() const { return _num_read; }
+ inline u_int32_t incr_num_read() { return ++_num_read; }
+ inline u_int32_t num_rproc() const { return _num_rproc; }
+ inline u_int32_t incr_num_rproc() { return ++_num_rproc; }
inline const journal::time_ns& start_time() const { return _start_time; }
inline void set_start_time() { ::clock_gettime(CLOCK_REALTIME, &_start_time); }
@@ -81,8 +81,8 @@
void add_exception(const journal::jexception& e, const bool set_stop_time_flag = true);
void add_exception(const std::string& err_str, const bool set_stop_time_flag = true);
void add_exception(const char* err_str, const bool set_stop_time_flag = true);
- inline const bool exception() const { return _exception_list.size() > 0; }
- inline const unsigned exception_count() const { return _exception_list.size(); }
+ inline bool exception() const { return _exception_list.size() > 0; }
+ inline unsigned exception_count() const { return _exception_list.size(); }
inline elist_citr begin() { return _exception_list.begin(); }
inline elist_citr end() { return _exception_list.end(); }
inline const std::string& operator[](unsigned i) { return _exception_list[i]; }
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case_result_agregation.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case_result_agregation.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case_result_agregation.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -54,12 +54,12 @@
void add_test_result(const test_case_result::shared_ptr& tcrp);
- inline const bool tc_average_mode() const { return _tc_average; }
- inline const bool fmt_chk_done() const { return _fmt_chk_done; }
- inline const bool fmt_chk_res() const { return _fmt_chk_err; }
+ inline bool tc_average_mode() const { return _tc_average; }
+ inline bool fmt_chk_done() const { return _fmt_chk_done; }
+ inline bool fmt_chk_res() const { return _fmt_chk_err; }
inline void set_fmt_chk_res(const bool err)
{ _fmt_chk_done = true; if (!_fmt_chk_err && err) _fmt_chk_err = err; }
- inline const u_int32_t num_results() const { return _rlist.size(); }
+ inline u_int32_t num_results() const { return _rlist.size(); }
inline tcrp_list_citr rlist_begin() const { return _rlist.begin(); }
inline tcrp_list_citr rlist_end() const { return _rlist.end(); }
inline const test_case_result::shared_ptr& operator[](unsigned i) const
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case_set.cpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case_set.cpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case_set.cpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -148,9 +148,9 @@
// Static member initializations
// This csv_map is for use on the standard spreadsheet-derived test case csv files.
test_case_set::csv_map test_case_set::std_csv_map;
-bool test_case_set::_map_init = __init();
+const bool test_case_set::_map_init = __init();
-const bool
+bool
test_case_set::__init()
{
std_csv_map.insert(test_case_set::csv_pair(0, test_case_set::CSV_TC_NUM));
Modified: store/trunk/cpp/tests/jrnl/jtt/test_case_set.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/jtt/test_case_set.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/jtt/test_case_set.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -63,7 +63,7 @@
private:
tcl _tc_list;
- static bool _map_init;
+ static const bool _map_init;
unsigned _csv_ignored;
public:
@@ -72,9 +72,9 @@
const csv_map& cols = std_csv_map);
virtual ~test_case_set();
- inline const unsigned size() const { return _tc_list.size(); }
- inline const unsigned ignored() const { return _csv_ignored; }
- inline const bool empty() const { return _tc_list.empty(); }
+ inline unsigned size() const { return _tc_list.size(); }
+ inline unsigned ignored() const { return _csv_ignored; }
+ inline bool empty() const { return _tc_list.empty(); }
inline void append(const test_case::shared_ptr& tc) { _tc_list.push_back(tc); }
void append(const unsigned test_case_num, const u_int32_t num_msgs,
@@ -91,7 +91,7 @@
private:
test_case::shared_ptr get_tc_from_csv(const std::string& csv_line, const csv_map& cols);
- static const bool __init();
+ static bool __init();
};
} // namespace jtt
Modified: store/trunk/cpp/tests/jrnl/msg_consumer.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/msg_consumer.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/msg_consumer.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -88,8 +88,8 @@
u_int32_t consume(_c_args* args) throw (rhm::journal::jexception);
void aio_callback(rhm::journal::jcntl* jc, std::vector<u_int16_t>& pil);
- const inline u_int64_t get_tot_dblks() const { return _tot_dblks; }
- const inline u_int64_t get_tot_dsize() const { return _tot_dsize; }
+ inline u_int64_t get_tot_dblks() const { return _tot_dblks; }
+ inline u_int64_t get_tot_dsize() const { return _tot_dsize; }
inline std::deque<rhm::journal::data_tok*>& aio_dtokl() { return _aio_cmpl_dtok_list; }
static void interrupt();
private:
Modified: store/trunk/cpp/tests/jrnl/msg_producer.hpp
===================================================================
--- store/trunk/cpp/tests/jrnl/msg_producer.hpp 2008-04-07 18:05:14 UTC (rev 1850)
+++ store/trunk/cpp/tests/jrnl/msg_producer.hpp 2008-04-07 20:35:18 UTC (rev 1851)
@@ -95,8 +95,8 @@
u_int32_t produce(_p_args* args) throw (rhm::journal::jexception);
void aio_callback(rhm::journal::jcntl* jc, std::vector<rhm::journal::data_tok*>& dtokl);
- const inline u_int64_t get_tot_dblks() const { return _tot_dblks; }
- const inline u_int64_t get_tot_dsize() const { return _tot_dsize; }
+ inline u_int64_t get_tot_dblks() const { return _tot_dblks; }
+ inline u_int64_t get_tot_dsize() const { return _tot_dsize; }
inline std::deque<rhm::journal::data_tok*>& aio_dtokl() { return _aio_cmpl_dtok_list; }
static void interrupt();
16 years, 9 months
rhmessaging commits: r1850 - store/trunk/cpp/lib/jrnl.
by rhmessaging-commits@lists.jboss.org
Author: nunofsantos
Date: 2008-04-07 14:05:14 -0400 (Mon, 07 Apr 2008)
New Revision: 1850
Modified:
store/trunk/cpp/lib/jrnl/rmgr.cpp
store/trunk/cpp/lib/jrnl/wmgr.cpp
Log:
Isolated cause of valgrind problem on RHEL5
Modified: store/trunk/cpp/lib/jrnl/rmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/rmgr.cpp 2008-04-07 17:30:14 UTC (rev 1849)
+++ store/trunk/cpp/lib/jrnl/rmgr.cpp 2008-04-07 18:05:14 UTC (rev 1850)
@@ -88,7 +88,7 @@
void
rmgr::clean()
{
- pmgr::clean();
+ // pmgr::clean();
::free(_fhdr_buffer);
_fhdr_buffer = 0;
Modified: store/trunk/cpp/lib/jrnl/wmgr.cpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-04-07 17:30:14 UTC (rev 1849)
+++ store/trunk/cpp/lib/jrnl/wmgr.cpp 2008-04-07 18:05:14 UTC (rev 1850)
@@ -1069,7 +1069,7 @@
void
wmgr::clean()
{
- pmgr::clean();
+ // pmgr::clean();
// clean up allocated memory here
::free(_fhdr_base_ptr);
_fhdr_base_ptr = 0;
16 years, 9 months
rhmessaging commits: r1849 - in mgmt: notes and 1 other directory.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2008-04-07 13:30:14 -0400 (Mon, 07 Apr 2008)
New Revision: 1849
Modified:
mgmt/cumin/python/cumin/brokercluster.py
mgmt/cumin/python/cumin/brokerprofile.py
mgmt/cumin/python/cumin/widgets.py
mgmt/notes/justin-todo.txt
Log:
Get rid of SQLObjectItemSet. Code should now use ItemSet or SqlTable.
Modified: mgmt/cumin/python/cumin/brokercluster.py
===================================================================
--- mgmt/cumin/python/cumin/brokercluster.py 2008-04-07 17:23:08 UTC (rev 1848)
+++ mgmt/cumin/python/cumin/brokercluster.py 2008-04-07 17:30:14 UTC (rev 1849)
@@ -12,7 +12,7 @@
strings = StringCatalog(__file__)
-class BrokerClusterSet(SQLObjectItemSet):
+class BrokerClusterSet(ItemSet):
def render_cluster_add_href(self, session, *args):
branch = session.branch()
self.page.show_broker_cluster_add(branch)
Modified: mgmt/cumin/python/cumin/brokerprofile.py
===================================================================
--- mgmt/cumin/python/cumin/brokerprofile.py 2008-04-07 17:23:08 UTC (rev 1848)
+++ mgmt/cumin/python/cumin/brokerprofile.py 2008-04-07 17:30:14 UTC (rev 1849)
@@ -11,7 +11,7 @@
strings = StringCatalog(__file__)
-class BrokerProfileSet(SQLObjectItemSet):
+class BrokerProfileSet(object):
def render_profile_add_href(self, session, *args):
branch = session.branch()
self.page.show_broker_profile_add(branch)
Modified: mgmt/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/cumin/python/cumin/widgets.py 2008-04-07 17:23:08 UTC (rev 1848)
+++ mgmt/cumin/python/cumin/widgets.py 2008-04-07 17:30:14 UTC (rev 1849)
@@ -424,16 +424,6 @@
def get_bounds(self, session):
return self.paginator.get_bounds(session)
-class SQLObjectItemSet(ItemSet):
- def get_item_count(self, session, *args):
- items = self.get_items(session, *args)
-
- if isinstance(items, SelectResults):
- return items.count()
- else:
- return super(SQLObjectItemSet, self).get_item_count \
- (session, *args)
-
class BrokerGroupInput(OptionInputSet):
def __init__(self, app, name, form):
super(BrokerGroupInput, self).__init__(app, name, form)
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2008-04-07 17:23:08 UTC (rev 1848)
+++ mgmt/notes/justin-todo.txt 2008-04-07 17:30:14 UTC (rev 1849)
@@ -58,8 +58,6 @@
* Add "slowest views" tracking to cumin-bench
- * Get rid of SQLObjectItemSet
-
* Only perform js updates if there's new data
* Avoid dirtying js namespace with updateFoo methods
16 years, 9 months