Author: kpvdr
Date: 2010-05-10 15:57:40 -0400 (Mon, 10 May 2010)
New Revision: 3958
Modified:
store/trunk/cpp/lib/MessageStoreImpl.cpp
store/trunk/cpp/lib/MessageStoreImpl.h
Log:
Removed some unused functions left over from the removal of the message db
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-05-10 19:53:29 UTC (rev 3957)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2010-05-10 19:57:40 UTC (rev 3958)
@@ -1187,40 +1187,6 @@
throw mrg::journal::jexception(mrg::journal::jerrno::JERR__NOTIMPL,
"MessageStoreImpl", "destroy");
}
-u_int64_t MessageStoreImpl::getRecordSize(db_ptr db,
- Dbt& key)
-{
- u_int64_t ret = 0;
- TxnCtxt txn;
- txn.begin(dbenv.get(), true);
- try {
- ret = getRecordSize(txn.get(), db, key);
- txn.commit();
- } catch (...) {
- txn.abort();
- throw;
- }
- return ret;
-}
-
-u_int64_t MessageStoreImpl::getRecordSize(DbTxn* txn,
- db_ptr db,
- Dbt& key)
-{
- Dbt peek;
- peek.set_flags(DB_DBT_USERMEM);
- peek.set_ulen(0);
- try {
- int status = db->get(txn, &key, &peek, 0);
- if (status != DB_BUFFER_SMALL) {
- THROW_STORE_EXCEPTION("Unexpected status code when determining record
length: " + std::string(DbEnv::strerror(status)));
- }
- } catch (const DbMemoryException& expected) {
- //api doc indicates may throw exception instead of status = DB_BUFFER_SMALL;
- }
- return peek.get_size();
-}
-
void MessageStoreImpl::appendContent(const intrusive_ptr<const
PersistableMessage>& /*msg*/,
const std::string& /*data*/)
{
@@ -1550,24 +1516,6 @@
}
}
-bool MessageStoreImpl::deleteKeyValuePair(db_ptr db,
- DbTxn* txn,
- Dbt& key,
- Dbt& value)
-{
- Cursor cursor;
- cursor.open(db, txn);
- int status = cursor->get(&key, &value, DB_GET_BOTH | DB_RMW);
- if (status == 0) {
- cursor->del(0);
- return true;
- } else if (status == DB_NOTFOUND) {
- return false;
- } else {
- THROW_STORE_EXCEPTION("Deletion failed: " +
std::string(DbEnv::strerror(status)));
- }
-}
-
void MessageStoreImpl::deleteBindingsForQueue(const PersistableQueue& queue)
{
TxnCtxt txn;
Modified: store/trunk/cpp/lib/MessageStoreImpl.h
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.h 2010-05-10 19:53:29 UTC (rev 3957)
+++ store/trunk/cpp/lib/MessageStoreImpl.h 2010-05-10 19:57:40 UTC (rev 3958)
@@ -221,28 +221,15 @@
const qpid::broker::Persistable& p);
void completed(TxnCtxt& txn,
bool commit);
- void record2pcOp(db_ptr db,
- TPCTxnCtxt& txn,
- u_int64_t messageId,
- u_int64_t queueId);
void deleteBindingsForQueue(const qpid::broker::PersistableQueue& queue);
void deleteBinding(const qpid::broker::PersistableExchange& exchange,
const qpid::broker::PersistableQueue& queue,
const std::string& key);
- u_int64_t getRecordSize(db_ptr db,
- Dbt& key);
- u_int64_t getRecordSize(DbTxn* txn,
- db_ptr db,
- Dbt& key);
void put(db_ptr db,
DbTxn* txn,
Dbt& key,
Dbt& value);
- bool deleteKeyValuePair(db_ptr db,
- DbTxn* txn,
- Dbt& key,
- Dbt& value);
void open(db_ptr db,
DbTxn* txn,
const char* file,
Show replies by date