Author: tedross
Date: 2008-09-03 14:32:51 -0400 (Wed, 03 Sep 2008)
New Revision: 2392
Added:
store/trunk/cpp/lib/gen/ArgsJournalExpand.h
store/trunk/cpp/lib/gen/Journal.cpp
store/trunk/cpp/lib/gen/Journal.h
store/trunk/cpp/lib/gen/PackageMrgstore.cpp
store/trunk/cpp/lib/gen/PackageMrgstore.h
store/trunk/cpp/lib/gen/Store.cpp
store/trunk/cpp/lib/gen/Store.h
store/trunk/cpp/lib/qmf-schema.xml
Removed:
store/trunk/cpp/lib/gen/qpid/
store/trunk/specs/management-schema.xml
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
store/trunk/cpp/lib/BdbMessageStore.h
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/Makefile.am
Log:
Updated to match qpid management changes
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2008-09-03 18:32:51 UTC (rev 2392)
@@ -28,7 +28,7 @@
#include "IdPairDbt.h"
#include "jrnl/txn_map.hpp"
#include "qpid/log/Statement.h"
-#include "qpid/management/PackageMrgstore.h"
+#include "PackageMrgstore.h"
#define MAX_AIO_SLEEPS 1000 // ~1 second
#define AIO_SLEEP_TIME 1000 // 1 milisecond
@@ -184,7 +184,7 @@
mgmtObject->set_tplDataFileSize(tplJrnlFsizeSblks * JRNL_SBLK_SIZE *
JRNL_DBLK_SIZE);
mgmtObject->set_tplCurrentFileCount(tplNumJrnlFiles);
- agent->addObject(mgmtObject, 50, 1);
+ agent->addObject(mgmtObject, 0x1000000000000050LL);
}
}
}
Modified: store/trunk/cpp/lib/BdbMessageStore.h
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.h 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/cpp/lib/BdbMessageStore.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -36,7 +36,7 @@
#include "qpid/broker/Broker.h"
#include "qpid/broker/MessageStore.h"
#include "qpid/management/Manageable.h"
-#include "qpid/management/Store.h"
+#include "Store.h"
#include "TxnCtxt.h"
// Assume DB_VERSION_MAJOR == 4
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2008-09-03 18:32:51 UTC (rev 2392)
@@ -28,8 +28,7 @@
#include "jrnl/slock.hpp"
#include "qpid/log/Statement.h"
#include "qpid/agent/ManagementAgent.h"
-#include "qpid/management/ArgsJournalExpand.h"
-#include "qpid/management/ArgsJournalReconfigure.h"
+#include "ArgsJournalExpand.h"
#include "qpid/sys/Monitor.h"
#include "StoreException.h"
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/cpp/lib/JournalImpl.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -34,7 +34,7 @@
#include <boost/ptr_container/ptr_list.hpp>
#include <boost/intrusive_ptr.hpp>
#include "qpid/management/Manageable.h"
-#include "qpid/management/Journal.h"
+#include "Journal.h"
namespace rhm {
namespace bdbstore {
Modified: store/trunk/cpp/lib/Makefile.am
===================================================================
--- store/trunk/cpp/lib/Makefile.am 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/cpp/lib/Makefile.am 2008-09-03 18:32:51 UTC (rev 2392)
@@ -95,14 +95,14 @@
jrnl/txn_rec.hpp \
jrnl/wmgr.hpp \
jrnl/wrfc.hpp \
- gen/qpid/management/PackageMrgstore.cpp \
- gen/qpid/management/PackageMrgstore.h \
- gen/qpid/management/Journal.cpp \
- gen/qpid/management/Journal.h \
- gen/qpid/management/Store.cpp \
- gen/qpid/management/Store.h \
- gen/qpid/management/ArgsJournalExpand.h \
- gen/qpid/management/ArgsJournalReconfigure.h
+ gen/PackageMrgstore.cpp \
+ gen/PackageMrgstore.h \
+ gen/Journal.cpp \
+ gen/Journal.h \
+ gen/Store.cpp \
+ gen/Store.h \
+ gen/ArgsJournalExpand.h \
+ gen/ArgsJournalReconfigure.h
BUILT_SOURCES = db-inc.h
Added: store/trunk/cpp/lib/gen/ArgsJournalExpand.h
===================================================================
--- store/trunk/cpp/lib/gen/ArgsJournalExpand.h (rev 0)
+++ store/trunk/cpp/lib/gen/ArgsJournalExpand.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,42 @@
+
+#ifndef _ARGS_JOURNALEXPAND_
+#define _ARGS_JOURNALEXPAND_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/Args.h"
+#include <string>
+
+namespace qpid {
+namespace management {
+
+class ArgsJournalExpand : public Args
+{
+ public:
+ uint32_t i_by;
+
+};
+
+}}
+
+#endif /*!_ARGS_JOURNALEXPAND_*/
Added: store/trunk/cpp/lib/gen/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/Journal.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/Journal.cpp 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,572 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/log/Statement.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/management/Manageable.h"
+#include "qpid/agent/ManagementAgent.h"
+#include "Journal.h"
+#include "ArgsJournalExpand.h"
+
+
+using namespace qpid::management;
+using namespace qpid::sys;
+using namespace qpid::framing;
+using std::string;
+
+string Journal::packageName = string ("mrgstore");
+string Journal::className = string ("journal");
+uint8_t Journal::md5Sum[16] =
+ {0x1e,0x63,0xa4,0x3d,0xa3,0x1b,0xc0,0x1,0x1,0x70,0x5a,0x2a,0xb4,0xa,0x1b,0x4e};
+
+Journal::Journal (ManagementAgent* _agent, Manageable* _core) :
+ ManagementObject(_agent, _core)
+{
+
+ recordDepth = 0;
+ recordDepthHigh = 0;
+ recordDepthLow = 0;
+ outstandingAIOs = 0;
+ outstandingAIOsHigh = 0;
+ outstandingAIOsLow = 0;
+ freeFileCount = 0;
+ freeFileCountHigh = 0;
+ freeFileCountLow = 0;
+ availableFileCount = 0;
+ availableFileCountHigh = 0;
+ availableFileCountLow = 0;
+ writePageCacheDepth = 0;
+ writePageCacheDepthHigh = 0;
+ writePageCacheDepthLow = 0;
+ readPageCacheDepth = 0;
+ readPageCacheDepthHigh = 0;
+ readPageCacheDepthLow = 0;
+
+
+
+ maxThreads = agent->getMaxThreads();
+ perThreadStatsArray = new struct PerThreadStats*[maxThreads];
+ for (int idx = 0; idx < maxThreads; idx++)
+ perThreadStatsArray[idx] = 0;
+
+}
+
+Journal::~Journal ()
+{
+
+ for (int idx = 0; idx < maxThreads; idx++)
+ if (perThreadStatsArray[idx] != 0)
+ delete perThreadStatsArray[idx];
+ delete[] perThreadStatsArray;
+
+}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string ACCESS("access");
+ const string INDEX("index");
+ const string OPTIONAL("optional");
+ const string UNIT("unit");
+ const string MIN("min");
+ const string MAX("max");
+ const string MAXLEN("maxlen");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+ const string DIR("dir");
+ const string DEFAULT("default");
+}
+
+void Journal::registerClass(ManagementAgent* agent)
+{
+ agent->RegisterClass(packageName, className, md5Sum, writeSchema);
+}
+
+void Journal::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (className); // Class Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (11); // Config Element Count
+ buf.putShort (28); // Inst Element Count
+ buf.putShort (1); // Method Count
+ buf.putShort (0); // Event Count
+
+ // Properties
+ ft = FieldTable ();
+ ft.setString (NAME, "queueRef");
+ ft.setInt (TYPE, TYPE_REF);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "name");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 1);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "directory");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Directory containing journal files");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "baseFileName");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Base filename prefix for journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Number of pages in write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Number of pages in read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "initialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files initially allocated to this
journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "dataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Size of each journal data file");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "currentFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files currently allocated to this
journal");
+ buf.put (ft);
+
+
+ // Statistics
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable
messages)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable messages)
(High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "recordDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Number of currently enqueued records (durable messages)
(Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "enqueues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total enqueued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "dequeues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total dequeued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnEnqueues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional enqueued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnDequeues");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional dequeued records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnCommits");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional commit records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "txnAborts");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transactional abort records on journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOs");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOsHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "outstandingAIOsLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files
trapped in holes.");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCountHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files
trapped in holes. (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "freeFileCountLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files free on this journal. Includes free files
trapped in holes. (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding
holes");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCountHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding holes
(High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "availableFileCountLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files available to be written. Excluding holes
(Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writeWaitFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Wait failures on write");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writeBusyFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Busy failures on write");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readRecordCount");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Records read from the journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readBusyFailures");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "AIO Busy failures on read");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "writePageCacheDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Current depth of write-page-cache (Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "readPageCacheDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "rpage");
+ ft.setString (DESC, "Current depth of read-page-cache (Low)");
+ buf.put (ft);
+
+
+ // Methods
+ ft = FieldTable ();
+ ft.setString (NAME, "expand");
+ ft.setInt (ARGCOUNT, 1);
+ ft.setString (DESC, "Increase number of files allocated for this
journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "by");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DIR, "I");
+ ft.setString (DESC, "Number of files to increase journal size by");
+ buf.put (ft);
+
+
+ // Events
+
+}
+
+
+void Journal::aggregatePerThreadStats(struct PerThreadStats* totals)
+{
+ totals->enqueues = 0;
+ totals->dequeues = 0;
+ totals->txnEnqueues = 0;
+ totals->txnDequeues = 0;
+ totals->txnCommits = 0;
+ totals->txnAborts = 0;
+ totals->writeWaitFailures = 0;
+ totals->writeBusyFailures = 0;
+ totals->readRecordCount = 0;
+ totals->readBusyFailures = 0;
+
+ for (int idx = 0; idx < maxThreads; idx++) {
+ struct PerThreadStats* threadStats = perThreadStatsArray[idx];
+ if (threadStats != 0) {
+ totals->enqueues += threadStats->enqueues;
+ totals->dequeues += threadStats->dequeues;
+ totals->txnEnqueues += threadStats->txnEnqueues;
+ totals->txnDequeues += threadStats->txnDequeues;
+ totals->txnCommits += threadStats->txnCommits;
+ totals->txnAborts += threadStats->txnAborts;
+ totals->writeWaitFailures += threadStats->writeWaitFailures;
+ totals->writeBusyFailures += threadStats->writeBusyFailures;
+ totals->readRecordCount += threadStats->readRecordCount;
+ totals->readBusyFailures += threadStats->readBusyFailures;
+
+ }
+ }
+}
+
+
+void Journal::writeProperties (Buffer& buf)
+{
+ sys::Mutex::ScopedLock mutex(accessLock);
+ configChanged = false;
+
+ writeTimestamps (buf);
+
+ queueRef.encode(buf);
+ buf.putShortString(name);
+ buf.putShortString(directory);
+ buf.putShortString(baseFileName);
+ buf.putLong(writePageSize);
+ buf.putLong(writePages);
+ buf.putLong(readPageSize);
+ buf.putLong(readPages);
+ buf.putShort(initialFileCount);
+ buf.putLong(dataFileSize);
+ buf.putLong(currentFileCount);
+
+}
+
+void Journal::writeStatistics (Buffer& buf, bool skipHeaders)
+{
+ sys::Mutex::ScopedLock mutex(accessLock);
+ instChanged = false;
+
+
+ struct PerThreadStats totals;
+ aggregatePerThreadStats(&totals);
+
+
+ if (!skipHeaders)
+ writeTimestamps (buf);
+ buf.putLong(recordDepth);
+ buf.putLong(recordDepthHigh);
+ buf.putLong(recordDepthLow);
+ buf.putLongLong(totals.enqueues);
+ buf.putLongLong(totals.dequeues);
+ buf.putLongLong(totals.txnEnqueues);
+ buf.putLongLong(totals.txnDequeues);
+ buf.putLongLong(totals.txnCommits);
+ buf.putLongLong(totals.txnAborts);
+ buf.putLong(outstandingAIOs);
+ buf.putLong(outstandingAIOsHigh);
+ buf.putLong(outstandingAIOsLow);
+ buf.putLong(freeFileCount);
+ buf.putLong(freeFileCountHigh);
+ buf.putLong(freeFileCountLow);
+ buf.putLong(availableFileCount);
+ buf.putLong(availableFileCountHigh);
+ buf.putLong(availableFileCountLow);
+ buf.putLongLong(totals.writeWaitFailures);
+ buf.putLongLong(totals.writeBusyFailures);
+ buf.putLongLong(totals.readRecordCount);
+ buf.putLongLong(totals.readBusyFailures);
+ buf.putLong(writePageCacheDepth);
+ buf.putLong(writePageCacheDepthHigh);
+ buf.putLong(writePageCacheDepthLow);
+ buf.putLong(readPageCacheDepth);
+ buf.putLong(readPageCacheDepthHigh);
+ buf.putLong(readPageCacheDepthLow);
+
+
+ // Maintenance of hi-lo statistics
+ recordDepthHigh = recordDepth;
+ recordDepthLow = recordDepth;
+ outstandingAIOsHigh = outstandingAIOs;
+ outstandingAIOsLow = outstandingAIOs;
+ freeFileCountHigh = freeFileCount;
+ freeFileCountLow = freeFileCount;
+ availableFileCountHigh = availableFileCount;
+ availableFileCountLow = availableFileCount;
+ writePageCacheDepthHigh = writePageCacheDepth;
+ writePageCacheDepthLow = writePageCacheDepth;
+ readPageCacheDepthHigh = readPageCacheDepth;
+ readPageCacheDepthLow = readPageCacheDepth;
+
+
+}
+
+void Journal::doMethod (string methodName, Buffer& inBuf, Buffer& outBuf)
+{
+ Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
+
+ if (methodName == "expand") {
+ ArgsJournalExpand ioArgs;
+ ioArgs.i_by = inBuf.getLong();
+ status = coreObject->ManagementMethod (METHOD_EXPAND, ioArgs);
+ outBuf.putLong (status);
+ outBuf.putShortString (Manageable::StatusText (status));
+ return;
+ }
+
+ outBuf.putLong (status);
+ outBuf.putShortString (Manageable::StatusText (status));
+}
+
+
Added: store/trunk/cpp/lib/gen/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/Journal.h (rev 0)
+++ store/trunk/cpp/lib/gen/Journal.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,415 @@
+
+#ifndef _MANAGEMENT_JOURNAL_
+#define _MANAGEMENT_JOURNAL_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/ManagementObject.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qpid {
+namespace management {
+
+class Journal : public ManagementObject
+{
+ private:
+
+ static std::string packageName;
+ static std::string className;
+ static uint8_t md5Sum[16];
+
+
+ // Properties
+ ObjectId queueRef;
+ std::string name;
+ std::string directory;
+ std::string baseFileName;
+ uint32_t writePageSize;
+ uint32_t writePages;
+ uint32_t readPageSize;
+ uint32_t readPages;
+ uint16_t initialFileCount;
+ uint32_t dataFileSize;
+ uint32_t currentFileCount;
+
+ // Statistics
+ uint32_t recordDepth;
+ uint32_t recordDepthHigh;
+ uint32_t recordDepthLow;
+ uint32_t outstandingAIOs;
+ uint32_t outstandingAIOsHigh;
+ uint32_t outstandingAIOsLow;
+ uint32_t freeFileCount;
+ uint32_t freeFileCountHigh;
+ uint32_t freeFileCountLow;
+ uint32_t availableFileCount;
+ uint32_t availableFileCountHigh;
+ uint32_t availableFileCountLow;
+ uint32_t writePageCacheDepth;
+ uint32_t writePageCacheDepthHigh;
+ uint32_t writePageCacheDepthLow;
+ uint32_t readPageCacheDepth;
+ uint32_t readPageCacheDepthHigh;
+ uint32_t readPageCacheDepthLow;
+
+
+ // Per-Thread Statistics
+ struct PerThreadStats {
+ uint64_t enqueues;
+ uint64_t dequeues;
+ uint64_t txnEnqueues;
+ uint64_t txnDequeues;
+ uint64_t txnCommits;
+ uint64_t txnAborts;
+ uint64_t writeWaitFailures;
+ uint64_t writeBusyFailures;
+ uint64_t readRecordCount;
+ uint64_t readBusyFailures;
+
+ };
+
+ struct PerThreadStats** perThreadStatsArray;
+
+ inline struct PerThreadStats* getThreadStats() {
+ int index = getThreadIndex();
+ struct PerThreadStats* threadStats = perThreadStatsArray[index];
+ if (threadStats == 0) {
+ threadStats = new(PerThreadStats);
+ perThreadStatsArray[index] = threadStats;
+ threadStats->enqueues = 0;
+ threadStats->dequeues = 0;
+ threadStats->txnEnqueues = 0;
+ threadStats->txnDequeues = 0;
+ threadStats->txnCommits = 0;
+ threadStats->txnAborts = 0;
+ threadStats->writeWaitFailures = 0;
+ threadStats->writeBusyFailures = 0;
+ threadStats->readRecordCount = 0;
+ threadStats->readBusyFailures = 0;
+
+ }
+ return threadStats;
+ }
+
+ void aggregatePerThreadStats(struct PerThreadStats*);
+
+ // Private Methods
+ static void writeSchema (qpid::framing::Buffer& buf);
+ void writeProperties (qpid::framing::Buffer& buf);
+ void writeStatistics (qpid::framing::Buffer& buf,
+ bool skipHeaders = false);
+ void doMethod (std::string methodName,
+ qpid::framing::Buffer& inBuf,
+ qpid::framing::Buffer& outBuf);
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ public:
+
+ Journal (ManagementAgent* agent,
+ Manageable* coreObject);
+ ~Journal (void);
+
+ void setReference(ObjectId objectId) { queueRef = objectId; }
+
+
+ static void registerClass (ManagementAgent* agent);
+ std::string& getPackageName (void) { return packageName; }
+ std::string& getClassName (void) { return className; }
+ uint8_t* getMd5Sum (void) { return md5Sum; }
+
+ // Method IDs
+ static const uint32_t METHOD_EXPAND = 1;
+
+ // Accessor Methods
+ inline void set_queueRef (ObjectId val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ queueRef = val;
+ configChanged = true;
+ }
+ inline ObjectId& get_queueRef() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return queueRef;
+ }
+ inline void set_name (std::string val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ name = val;
+ configChanged = true;
+ }
+ inline std::string& get_name() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return name;
+ }
+ inline void set_directory (std::string val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ directory = val;
+ configChanged = true;
+ }
+ inline std::string& get_directory() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return directory;
+ }
+ inline void set_baseFileName (std::string val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ baseFileName = val;
+ configChanged = true;
+ }
+ inline std::string& get_baseFileName() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return baseFileName;
+ }
+ inline void set_writePageSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ writePageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_writePageSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return writePageSize;
+ }
+ inline void set_writePages (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ writePages = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_writePages() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return writePages;
+ }
+ inline void set_readPageSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ readPageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_readPageSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return readPageSize;
+ }
+ inline void set_readPages (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ readPages = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_readPages() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return readPages;
+ }
+ inline void set_initialFileCount (uint16_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ initialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t& get_initialFileCount() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return initialFileCount;
+ }
+ inline void set_dataFileSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ dataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_dataFileSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return dataFileSize;
+ }
+ inline void set_currentFileCount (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ currentFileCount = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_currentFileCount() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return currentFileCount;
+ }
+ inline void inc_recordDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ recordDepth += by;
+ if (recordDepthHigh < recordDepth)
+ recordDepthHigh = recordDepth;
+ instChanged = true;
+ }
+ inline void dec_recordDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ recordDepth -= by;
+ if (recordDepthLow > recordDepth)
+ recordDepthLow = recordDepth;
+ instChanged = true;
+ }
+ inline void inc_enqueues (uint64_t by = 1) {
+ getThreadStats()->enqueues += by;
+ instChanged = true;
+ }
+ inline void dec_enqueues (uint64_t by = 1) {
+ getThreadStats()->enqueues -= by;
+ instChanged = true;
+ }
+ inline void inc_dequeues (uint64_t by = 1) {
+ getThreadStats()->dequeues += by;
+ instChanged = true;
+ }
+ inline void dec_dequeues (uint64_t by = 1) {
+ getThreadStats()->dequeues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnEnqueues (uint64_t by = 1) {
+ getThreadStats()->txnEnqueues += by;
+ instChanged = true;
+ }
+ inline void dec_txnEnqueues (uint64_t by = 1) {
+ getThreadStats()->txnEnqueues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnDequeues (uint64_t by = 1) {
+ getThreadStats()->txnDequeues += by;
+ instChanged = true;
+ }
+ inline void dec_txnDequeues (uint64_t by = 1) {
+ getThreadStats()->txnDequeues -= by;
+ instChanged = true;
+ }
+ inline void inc_txnCommits (uint64_t by = 1) {
+ getThreadStats()->txnCommits += by;
+ instChanged = true;
+ }
+ inline void dec_txnCommits (uint64_t by = 1) {
+ getThreadStats()->txnCommits -= by;
+ instChanged = true;
+ }
+ inline void inc_txnAborts (uint64_t by = 1) {
+ getThreadStats()->txnAborts += by;
+ instChanged = true;
+ }
+ inline void dec_txnAborts (uint64_t by = 1) {
+ getThreadStats()->txnAborts -= by;
+ instChanged = true;
+ }
+ inline void inc_outstandingAIOs (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ outstandingAIOs += by;
+ if (outstandingAIOsHigh < outstandingAIOs)
+ outstandingAIOsHigh = outstandingAIOs;
+ instChanged = true;
+ }
+ inline void dec_outstandingAIOs (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ outstandingAIOs -= by;
+ if (outstandingAIOsLow > outstandingAIOs)
+ outstandingAIOsLow = outstandingAIOs;
+ instChanged = true;
+ }
+ inline void inc_freeFileCount (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ freeFileCount += by;
+ if (freeFileCountHigh < freeFileCount)
+ freeFileCountHigh = freeFileCount;
+ instChanged = true;
+ }
+ inline void dec_freeFileCount (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ freeFileCount -= by;
+ if (freeFileCountLow > freeFileCount)
+ freeFileCountLow = freeFileCount;
+ instChanged = true;
+ }
+ inline void inc_availableFileCount (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ availableFileCount += by;
+ if (availableFileCountHigh < availableFileCount)
+ availableFileCountHigh = availableFileCount;
+ instChanged = true;
+ }
+ inline void dec_availableFileCount (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ availableFileCount -= by;
+ if (availableFileCountLow > availableFileCount)
+ availableFileCountLow = availableFileCount;
+ instChanged = true;
+ }
+ inline void inc_writeWaitFailures (uint64_t by = 1) {
+ getThreadStats()->writeWaitFailures += by;
+ instChanged = true;
+ }
+ inline void dec_writeWaitFailures (uint64_t by = 1) {
+ getThreadStats()->writeWaitFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_writeBusyFailures (uint64_t by = 1) {
+ getThreadStats()->writeBusyFailures += by;
+ instChanged = true;
+ }
+ inline void dec_writeBusyFailures (uint64_t by = 1) {
+ getThreadStats()->writeBusyFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_readRecordCount (uint64_t by = 1) {
+ getThreadStats()->readRecordCount += by;
+ instChanged = true;
+ }
+ inline void dec_readRecordCount (uint64_t by = 1) {
+ getThreadStats()->readRecordCount -= by;
+ instChanged = true;
+ }
+ inline void inc_readBusyFailures (uint64_t by = 1) {
+ getThreadStats()->readBusyFailures += by;
+ instChanged = true;
+ }
+ inline void dec_readBusyFailures (uint64_t by = 1) {
+ getThreadStats()->readBusyFailures -= by;
+ instChanged = true;
+ }
+ inline void inc_writePageCacheDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ writePageCacheDepth += by;
+ if (writePageCacheDepthHigh < writePageCacheDepth)
+ writePageCacheDepthHigh = writePageCacheDepth;
+ instChanged = true;
+ }
+ inline void dec_writePageCacheDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ writePageCacheDepth -= by;
+ if (writePageCacheDepthLow > writePageCacheDepth)
+ writePageCacheDepthLow = writePageCacheDepth;
+ instChanged = true;
+ }
+ inline void inc_readPageCacheDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ readPageCacheDepth += by;
+ if (readPageCacheDepthHigh < readPageCacheDepth)
+ readPageCacheDepthHigh = readPageCacheDepth;
+ instChanged = true;
+ }
+ inline void dec_readPageCacheDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ readPageCacheDepth -= by;
+ if (readPageCacheDepthLow > readPageCacheDepth)
+ readPageCacheDepthLow = readPageCacheDepth;
+ instChanged = true;
+ }
+
+ // Event Methods
+
+};
+
+}}
+
+#endif /*!_MANAGEMENT_JOURNAL_*/
Added: store/trunk/cpp/lib/gen/PackageMrgstore.cpp
===================================================================
--- store/trunk/cpp/lib/gen/PackageMrgstore.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/PackageMrgstore.cpp 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,37 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "PackageMrgstore.h"
+#include "Store.h"
+#include "Journal.h"
+
+
+using namespace qpid::management;
+
+PackageMrgstore::PackageMrgstore (ManagementAgent* agent)
+{
+ Store::registerClass(agent);
+ Journal::registerClass(agent);
+
+}
+
Added: store/trunk/cpp/lib/gen/PackageMrgstore.h
===================================================================
--- store/trunk/cpp/lib/gen/PackageMrgstore.h (rev 0)
+++ store/trunk/cpp/lib/gen/PackageMrgstore.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,42 @@
+
+#ifndef _MANAGEMENT_PACKAGE_MRGSTORE_
+#define _MANAGEMENT_PACKAGE_MRGSTORE_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/agent/ManagementAgent.h"
+
+namespace qpid {
+namespace management {
+
+class PackageMrgstore
+{
+ public:
+ PackageMrgstore (ManagementAgent* agent);
+ ~PackageMrgstore () {}
+};
+
+}}
+
+
+#endif /*!_MANAGEMENT_PACKAGE_MRGSTORE_*/
Added: store/trunk/cpp/lib/gen/Store.cpp
===================================================================
--- store/trunk/cpp/lib/gen/Store.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/Store.cpp 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,364 @@
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/log/Statement.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/management/Manageable.h"
+#include "qpid/agent/ManagementAgent.h"
+#include "Store.h"
+
+
+using namespace qpid::management;
+using namespace qpid::sys;
+using namespace qpid::framing;
+using std::string;
+
+string Store::packageName = string ("mrgstore");
+string Store::className = string ("store");
+uint8_t Store::md5Sum[16] =
+ {0x18,0xd,0xd4,0x15,0xd3,0x9a,0xf,0xbe,0x3a,0x40,0xe1,0x1b,0x9e,0x5b,0x7e,0x86};
+
+Store::Store (ManagementAgent* _agent, Manageable* _core, Manageable* _parent) :
+ ManagementObject(_agent, _core)
+{
+ brokerRef = _parent->GetManagementObject ()->getObjectId ();
+ tplTransactionDepth = 0;
+ tplTransactionDepthHigh = 0;
+ tplTransactionDepthLow = 0;
+ tplOutstandingAIOs = 0;
+ tplOutstandingAIOsHigh = 0;
+ tplOutstandingAIOsLow = 0;
+
+
+
+ maxThreads = agent->getMaxThreads();
+ perThreadStatsArray = new struct PerThreadStats*[maxThreads];
+ for (int idx = 0; idx < maxThreads; idx++)
+ perThreadStatsArray[idx] = 0;
+
+}
+
+Store::~Store ()
+{
+
+ for (int idx = 0; idx < maxThreads; idx++)
+ if (perThreadStatsArray[idx] != 0)
+ delete perThreadStatsArray[idx];
+ delete[] perThreadStatsArray;
+
+}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string ACCESS("access");
+ const string INDEX("index");
+ const string OPTIONAL("optional");
+ const string UNIT("unit");
+ const string MIN("min");
+ const string MAX("max");
+ const string MAXLEN("maxlen");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+ const string DIR("dir");
+ const string DEFAULT("default");
+}
+
+void Store::registerClass(ManagementAgent* agent)
+{
+ agent->RegisterClass(packageName, className, md5Sum, writeSchema);
+}
+
+void Store::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (className); // Class Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (11); // Config Element Count
+ buf.putShort (9); // Inst Element Count
+ buf.putShort (0); // Method Count
+ buf.putShort (0); // Event Count
+
+ // Properties
+ ft = FieldTable ();
+ ft.setString (NAME, "brokerRef");
+ ft.setInt (TYPE, TYPE_REF);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 1);
+ ft.setInt (OPTIONAL, 0);
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "location");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Logical directory on disk");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "defaultInitialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Default number of files initially allocated to each
journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "defaultDataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "RdPg");
+ ft.setString (DESC, "Default size of each journal data file");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplIsInitialized");
+ ft.setInt (TYPE, TYPE_BOOL);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Transaction prepared list has been initialized by a
transactional prepare");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplDirectory");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (DESC, "Transaction prepared list directory");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplWritePageSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Page size in transaction prepared list
write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplWritePages");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "wpage");
+ ft.setString (DESC, "Number of pages in transaction prepared list
write-page-cache");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplInitialFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files initially allocated to transaction
prepared list journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplDataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Size of each journal data file in transaction prepared
list journal");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplCurrentFileCount");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (INDEX, 0);
+ ft.setInt (OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Number of files currently allocated to transaction
prepared list journal");
+ buf.put (ft);
+
+
+ // Statistics
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepth");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared
transactions");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepthHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared transactions
(High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTransactionDepthLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "txn");
+ ft.setString (DESC, "Number of currently enqueued prepared transactions
(Low)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnPrepares");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction prepares on transaction prepared
list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnCommits");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction commits on transaction prepared
list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplTxnAborts");
+ ft.setInt (TYPE, TYPE_U64);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total transaction aborts on transaction prepared
list");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOs");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOsHigh");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system (High)");
+ buf.put (ft);
+
+ ft = FieldTable ();
+ ft.setString (NAME, "tplOutstandingAIOsLow");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "aio_op");
+ ft.setString (DESC, "Number of currently outstanding AIO requests in Async IO
system (Low)");
+ buf.put (ft);
+
+
+ // Methods
+
+ // Events
+
+}
+
+
+void Store::aggregatePerThreadStats(struct PerThreadStats* totals)
+{
+ totals->tplTxnPrepares = 0;
+ totals->tplTxnCommits = 0;
+ totals->tplTxnAborts = 0;
+
+ for (int idx = 0; idx < maxThreads; idx++) {
+ struct PerThreadStats* threadStats = perThreadStatsArray[idx];
+ if (threadStats != 0) {
+ totals->tplTxnPrepares += threadStats->tplTxnPrepares;
+ totals->tplTxnCommits += threadStats->tplTxnCommits;
+ totals->tplTxnAborts += threadStats->tplTxnAborts;
+
+ }
+ }
+}
+
+
+void Store::writeProperties (Buffer& buf)
+{
+ sys::Mutex::ScopedLock mutex(accessLock);
+ configChanged = false;
+
+ writeTimestamps (buf);
+
+ brokerRef.encode(buf);
+ buf.putShortString(location);
+ buf.putShort(defaultInitialFileCount);
+ buf.putLong(defaultDataFileSize);
+ buf.putOctet(tplIsInitialized?1:0);
+ buf.putShortString(tplDirectory);
+ buf.putLong(tplWritePageSize);
+ buf.putLong(tplWritePages);
+ buf.putShort(tplInitialFileCount);
+ buf.putLong(tplDataFileSize);
+ buf.putLong(tplCurrentFileCount);
+
+}
+
+void Store::writeStatistics (Buffer& buf, bool skipHeaders)
+{
+ sys::Mutex::ScopedLock mutex(accessLock);
+ instChanged = false;
+
+
+ struct PerThreadStats totals;
+ aggregatePerThreadStats(&totals);
+
+
+ if (!skipHeaders)
+ writeTimestamps (buf);
+ buf.putLong(tplTransactionDepth);
+ buf.putLong(tplTransactionDepthHigh);
+ buf.putLong(tplTransactionDepthLow);
+ buf.putLongLong(totals.tplTxnPrepares);
+ buf.putLongLong(totals.tplTxnCommits);
+ buf.putLongLong(totals.tplTxnAborts);
+ buf.putLong(tplOutstandingAIOs);
+ buf.putLong(tplOutstandingAIOsHigh);
+ buf.putLong(tplOutstandingAIOsLow);
+
+
+ // Maintenance of hi-lo statistics
+ tplTransactionDepthHigh = tplTransactionDepth;
+ tplTransactionDepthLow = tplTransactionDepth;
+ tplOutstandingAIOsHigh = tplOutstandingAIOs;
+ tplOutstandingAIOsLow = tplOutstandingAIOs;
+
+
+}
+
+void Store::doMethod (string, Buffer&, Buffer& outBuf)
+{
+ Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD;
+
+ outBuf.putLong (status);
+ outBuf.putShortString (Manageable::StatusText (status));
+}
+
+
Added: store/trunk/cpp/lib/gen/Store.h
===================================================================
--- store/trunk/cpp/lib/gen/Store.h (rev 0)
+++ store/trunk/cpp/lib/gen/Store.h 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,275 @@
+
+#ifndef _MANAGEMENT_STORE_
+#define _MANAGEMENT_STORE_
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// This source file was created by a code generator.
+// Please do not edit.
+
+#include "qpid/management/ManagementObject.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qpid {
+namespace management {
+
+class Store : public ManagementObject
+{
+ private:
+
+ static std::string packageName;
+ static std::string className;
+ static uint8_t md5Sum[16];
+
+
+ // Properties
+ ObjectId brokerRef;
+ std::string location;
+ uint16_t defaultInitialFileCount;
+ uint32_t defaultDataFileSize;
+ uint8_t tplIsInitialized;
+ std::string tplDirectory;
+ uint32_t tplWritePageSize;
+ uint32_t tplWritePages;
+ uint16_t tplInitialFileCount;
+ uint32_t tplDataFileSize;
+ uint32_t tplCurrentFileCount;
+
+ // Statistics
+ uint32_t tplTransactionDepth;
+ uint32_t tplTransactionDepthHigh;
+ uint32_t tplTransactionDepthLow;
+ uint32_t tplOutstandingAIOs;
+ uint32_t tplOutstandingAIOsHigh;
+ uint32_t tplOutstandingAIOsLow;
+
+
+ // Per-Thread Statistics
+ struct PerThreadStats {
+ uint64_t tplTxnPrepares;
+ uint64_t tplTxnCommits;
+ uint64_t tplTxnAborts;
+
+ };
+
+ struct PerThreadStats** perThreadStatsArray;
+
+ inline struct PerThreadStats* getThreadStats() {
+ int index = getThreadIndex();
+ struct PerThreadStats* threadStats = perThreadStatsArray[index];
+ if (threadStats == 0) {
+ threadStats = new(PerThreadStats);
+ perThreadStatsArray[index] = threadStats;
+ threadStats->tplTxnPrepares = 0;
+ threadStats->tplTxnCommits = 0;
+ threadStats->tplTxnAborts = 0;
+
+ }
+ return threadStats;
+ }
+
+ void aggregatePerThreadStats(struct PerThreadStats*);
+
+ // Private Methods
+ static void writeSchema (qpid::framing::Buffer& buf);
+ void writeProperties (qpid::framing::Buffer& buf);
+ void writeStatistics (qpid::framing::Buffer& buf,
+ bool skipHeaders = false);
+ void doMethod (std::string methodName,
+ qpid::framing::Buffer& inBuf,
+ qpid::framing::Buffer& outBuf);
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ public:
+
+ Store (ManagementAgent* agent,
+ Manageable* coreObject, Manageable* _parent);
+ ~Store (void);
+
+
+
+ static void registerClass (ManagementAgent* agent);
+ std::string& getPackageName (void) { return packageName; }
+ std::string& getClassName (void) { return className; }
+ uint8_t* getMd5Sum (void) { return md5Sum; }
+
+ // Method IDs
+
+ // Accessor Methods
+ inline void set_brokerRef (ObjectId val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ brokerRef = val;
+ configChanged = true;
+ }
+ inline ObjectId& get_brokerRef() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return brokerRef;
+ }
+ inline void set_location (std::string val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ location = val;
+ configChanged = true;
+ }
+ inline std::string& get_location() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return location;
+ }
+ inline void set_defaultInitialFileCount (uint16_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ defaultInitialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t& get_defaultInitialFileCount() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return defaultInitialFileCount;
+ }
+ inline void set_defaultDataFileSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ defaultDataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_defaultDataFileSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return defaultDataFileSize;
+ }
+ inline void set_tplIsInitialized (uint8_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplIsInitialized = val;
+ configChanged = true;
+ }
+ inline uint8_t& get_tplIsInitialized() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplIsInitialized;
+ }
+ inline void set_tplDirectory (std::string val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplDirectory = val;
+ configChanged = true;
+ }
+ inline std::string& get_tplDirectory() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplDirectory;
+ }
+ inline void set_tplWritePageSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplWritePageSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_tplWritePageSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplWritePageSize;
+ }
+ inline void set_tplWritePages (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplWritePages = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_tplWritePages() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplWritePages;
+ }
+ inline void set_tplInitialFileCount (uint16_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplInitialFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t& get_tplInitialFileCount() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplInitialFileCount;
+ }
+ inline void set_tplDataFileSize (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplDataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_tplDataFileSize() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplDataFileSize;
+ }
+ inline void set_tplCurrentFileCount (uint32_t val) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplCurrentFileCount = val;
+ configChanged = true;
+ }
+ inline uint32_t& get_tplCurrentFileCount() {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ return tplCurrentFileCount;
+ }
+ inline void inc_tplTransactionDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplTransactionDepth += by;
+ if (tplTransactionDepthHigh < tplTransactionDepth)
+ tplTransactionDepthHigh = tplTransactionDepth;
+ instChanged = true;
+ }
+ inline void dec_tplTransactionDepth (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplTransactionDepth -= by;
+ if (tplTransactionDepthLow > tplTransactionDepth)
+ tplTransactionDepthLow = tplTransactionDepth;
+ instChanged = true;
+ }
+ inline void inc_tplTxnPrepares (uint64_t by = 1) {
+ getThreadStats()->tplTxnPrepares += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnPrepares (uint64_t by = 1) {
+ getThreadStats()->tplTxnPrepares -= by;
+ instChanged = true;
+ }
+ inline void inc_tplTxnCommits (uint64_t by = 1) {
+ getThreadStats()->tplTxnCommits += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnCommits (uint64_t by = 1) {
+ getThreadStats()->tplTxnCommits -= by;
+ instChanged = true;
+ }
+ inline void inc_tplTxnAborts (uint64_t by = 1) {
+ getThreadStats()->tplTxnAborts += by;
+ instChanged = true;
+ }
+ inline void dec_tplTxnAborts (uint64_t by = 1) {
+ getThreadStats()->tplTxnAborts -= by;
+ instChanged = true;
+ }
+ inline void inc_tplOutstandingAIOs (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplOutstandingAIOs += by;
+ if (tplOutstandingAIOsHigh < tplOutstandingAIOs)
+ tplOutstandingAIOsHigh = tplOutstandingAIOs;
+ instChanged = true;
+ }
+ inline void dec_tplOutstandingAIOs (uint32_t by = 1) {
+ sys::Mutex::ScopedLock mutex(accessLock);
+ tplOutstandingAIOs -= by;
+ if (tplOutstandingAIOsLow > tplOutstandingAIOs)
+ tplOutstandingAIOsLow = tplOutstandingAIOs;
+ instChanged = true;
+ }
+
+ // Event Methods
+
+};
+
+}}
+
+#endif /*!_MANAGEMENT_STORE_*/
Added: store/trunk/cpp/lib/qmf-schema.xml
===================================================================
--- store/trunk/cpp/lib/qmf-schema.xml (rev 0)
+++ store/trunk/cpp/lib/qmf-schema.xml 2008-09-03 18:32:51 UTC (rev 2392)
@@ -0,0 +1,64 @@
+<schema package="mrgstore">
+
+<!--
+ License Text
+-->
+ <class name="Store">
+ <property name="brokerRef" type="objId"
access="RO" references="qpid.Broker" index="y"
parentRef="y"/>
+ <property name="location" type="sstr"
access="RO" desc="Logical directory on disk"/>
+ <property name="defaultInitialFileCount" type="uint16"
access="RO" unit="file" desc="Default number of files initially
allocated to each journal"/>
+ <property name="defaultDataFileSize" type="uint32"
access="RO" unit="RdPg" desc="Default size of each journal data
file"/>
+ <property name="tplIsInitialized" type="bool"
access="RO" desc="Transaction prepared list has been
initialized by a transactional prepare"/>
+ <property name="tplDirectory" type="sstr"
access="RO" desc="Transaction prepared list
directory"/>
+ <property name="tplWritePageSize" type="uint32"
access="RO" unit="byte" desc="Page size in transaction prepared
list write-page-cache"/>
+ <property name="tplWritePages" type="uint32"
access="RO" unit="wpage" desc="Number of pages in transaction
prepared list write-page-cache"/>
+ <property name="tplInitialFileCount" type="uint16"
access="RO" unit="file" desc="Number of files initially
allocated to transaction prepared list journal"/>
+ <property name="tplDataFileSize" type="uint32"
access="RO" unit="byte" desc="Size of each journal data file in
transaction prepared list journal"/>
+ <property name="tplCurrentFileCount" type="uint32"
access="RO" unit="file" desc="Number of files currently
allocated to transaction prepared list journal"/>
+
+ <statistic name="tplTransactionDepth" type="hilo32"
unit="txn" desc="Number of currently enqueued prepared
transactions"/>
+ <statistic name="tplTxnPrepares" type="count64"
unit="record" desc="Total transaction prepares on transaction prepared
list"/>
+ <statistic name="tplTxnCommits" type="count64"
unit="record" desc="Total transaction commits on transaction prepared
list"/>
+ <statistic name="tplTxnAborts" type="count64"
unit="record" desc="Total transaction aborts on transaction prepared
list"/>
+ <statistic name="tplOutstandingAIOs" type="hilo32"
unit="aio_op" desc="Number of currently outstanding AIO requests in Async
IO system"/>
+ </class>
+
+ <class name="Journal">
+ <property name="queueRef" type="objId"
access="RO" references="qpid.Queue"
isGeneralReference="y"/>
+ <property name="name" type="sstr"
access="RO" index="y"/>
+ <property name="directory" type="sstr"
access="RO" desc="Directory containing journal
files"/>
+ <property name="baseFileName" type="sstr"
access="RO" desc="Base filename prefix for journal"/>
+ <property name="writePageSize" type="uint32"
access="RO" unit="byte" desc="Page size in
write-page-cache"/>
+ <property name="writePages" type="uint32"
access="RO" unit="wpage" desc="Number of pages in
write-page-cache"/>
+ <property name="readPageSize" type="uint32"
access="RO" unit="byte" desc="Page size in
read-page-cache"/>
+ <property name="readPages" type="uint32"
access="RO" unit="rpage" desc="Number of pages in
read-page-cache"/>
+ <property name="initialFileCount" type="uint16"
access="RO" unit="file" desc="Number of files initially
allocated to this journal"/>
+ <property name="dataFileSize" type="uint32"
access="RO" unit="byte" desc="Size of each journal data
file"/>
+ <property name="currentFileCount" type="uint32"
access="RO" unit="file" desc="Number of files currently
allocated to this journal"/>
+
+ <statistic name="recordDepth" type="hilo32"
unit="record" desc="Number of currently enqueued records (durable
messages)"/>
+ <statistic name="enqueues" type="count64"
unit="record" desc="Total enqueued records on journal"/>
+ <statistic name="dequeues" type="count64"
unit="record" desc="Total dequeued records on journal"/>
+ <statistic name="txnEnqueues" type="count64"
unit="record" desc="Total transactional enqueued records on
journal"/>
+ <statistic name="txnDequeues" type="count64"
unit="record" desc="Total transactional dequeued records on
journal"/>
+ <statistic name="txnCommits" type="count64"
unit="record" desc="Total transactional commit records on
journal"/>
+ <statistic name="txnAborts" type="count64"
unit="record" desc="Total transactional abort records on
journal"/>
+ <statistic name="outstandingAIOs" type="hilo32"
unit="aio_op" desc="Number of currently outstanding AIO requests in Async
IO system"/>
+
+<!--
+ The following are not yet "wired up" in JournalImpl.cpp
+-->
+ <statistic name="freeFileCount" type="hilo32"
unit="file" desc="Number of files free on this journal. Includes free
files trapped in holes."/>
+ <statistic name="availableFileCount" type="hilo32"
unit="file" desc="Number of files available to be written. Excluding
holes"/>
+ <statistic name="writeWaitFailures" type="count64"
unit="record" desc="AIO Wait failures on write"/>
+ <statistic name="writeBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on write"/>
+ <statistic name="readRecordCount" type="count64"
unit="record" desc="Records read from the journal"/>
+ <statistic name="readBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on read"/>
+ <statistic name="writePageCacheDepth" type="hilo32"
unit="wpage" desc="Current depth of write-page-cache"/>
+ <statistic name="readPageCacheDepth" type="hilo32"
unit="rpage" desc="Current depth of read-page-cache"/>
+
+ <method name="expand" desc="Increase number of files allocated for
this journal">
+ <arg name="by" type="uint32" dir="I"
desc="Number of files to increase journal size by"/>
+ </method>
+ </class>
+</schema>
Deleted: store/trunk/specs/management-schema.xml
===================================================================
--- store/trunk/specs/management-schema.xml 2008-09-03 16:31:20 UTC (rev 2391)
+++ store/trunk/specs/management-schema.xml 2008-09-03 18:32:51 UTC (rev 2392)
@@ -1,64 +0,0 @@
-<schema package="mrgstore">
-
-<!--
- License Text
--->
- <class name="Store">
- <property name="brokerRef" type="objId"
access="RO" references="qpid.Broker" index="y"
parentRef="y"/>
- <property name="location" type="sstr"
access="RO" desc="Logical directory on disk"/>
- <property name="defaultInitialFileCount" type="uint16"
access="RO" unit="file" desc="Default number of files initially
allocated to each journal"/>
- <property name="defaultDataFileSize" type="uint32"
access="RO" unit="RdPg" desc="Default size of each journal data
file"/>
- <property name="tplIsInitialized" type="bool"
access="RO" desc="Transaction prepared list has been
initialized by a transactional prepare"/>
- <property name="tplDirectory" type="sstr"
access="RO" desc="Transaction prepared list
directory"/>
- <property name="tplWritePageSize" type="uint32"
access="RO" unit="byte" desc="Page size in transaction prepared
list write-page-cache"/>
- <property name="tplWritePages" type="uint32"
access="RO" unit="wpage" desc="Number of pages in transaction
prepared list write-page-cache"/>
- <property name="tplInitialFileCount" type="uint16"
access="RO" unit="file" desc="Number of files initially
allocated to transaction prepared list journal"/>
- <property name="tplDataFileSize" type="uint32"
access="RO" unit="byte" desc="Size of each journal data file in
transaction prepared list journal"/>
- <property name="tplCurrentFileCount" type="uint32"
access="RO" unit="file" desc="Number of files currently
allocated to transaction prepared list journal"/>
-
- <statistic name="tplTransactionDepth" type="hilo32"
unit="txn" desc="Number of currently enqueued prepared
transactions"/>
- <statistic name="tplTxnPrepares" type="count64"
unit="record" desc="Total transaction prepares on transaction prepared
list"/>
- <statistic name="tplTxnCommits" type="count64"
unit="record" desc="Total transaction commits on transaction prepared
list"/>
- <statistic name="tplTxnAborts" type="count64"
unit="record" desc="Total transaction aborts on transaction prepared
list"/>
- <statistic name="tplOutstandingAIOs" type="hilo32"
unit="aio_op" desc="Number of currently outstanding AIO requests in Async
IO system"/>
- </class>
-
- <class name="Journal">
- <property name="queueRef" type="objId"
access="RO" references="qpid.Queue"
isGeneralReference="y"/>
- <property name="name" type="sstr"
access="RO" index="y"/>
- <property name="directory" type="sstr"
access="RO" desc="Directory containing journal
files"/>
- <property name="baseFileName" type="sstr"
access="RO" desc="Base filename prefix for journal"/>
- <property name="writePageSize" type="uint32"
access="RO" unit="byte" desc="Page size in
write-page-cache"/>
- <property name="writePages" type="uint32"
access="RO" unit="wpage" desc="Number of pages in
write-page-cache"/>
- <property name="readPageSize" type="uint32"
access="RO" unit="byte" desc="Page size in
read-page-cache"/>
- <property name="readPages" type="uint32"
access="RO" unit="rpage" desc="Number of pages in
read-page-cache"/>
- <property name="initialFileCount" type="uint16"
access="RO" unit="file" desc="Number of files initially
allocated to this journal"/>
- <property name="dataFileSize" type="uint32"
access="RO" unit="byte" desc="Size of each journal data
file"/>
- <property name="currentFileCount" type="uint32"
access="RO" unit="file" desc="Number of files currently
allocated to this journal"/>
-
- <statistic name="recordDepth" type="hilo32"
unit="record" desc="Number of currently enqueued records (durable
messages)"/>
- <statistic name="enqueues" type="count64"
unit="record" desc="Total enqueued records on journal"/>
- <statistic name="dequeues" type="count64"
unit="record" desc="Total dequeued records on journal"/>
- <statistic name="txnEnqueues" type="count64"
unit="record" desc="Total transactional enqueued records on
journal"/>
- <statistic name="txnDequeues" type="count64"
unit="record" desc="Total transactional dequeued records on
journal"/>
- <statistic name="txnCommits" type="count64"
unit="record" desc="Total transactional commit records on
journal"/>
- <statistic name="txnAborts" type="count64"
unit="record" desc="Total transactional abort records on
journal"/>
- <statistic name="outstandingAIOs" type="hilo32"
unit="aio_op" desc="Number of currently outstanding AIO requests in Async
IO system"/>
-
-<!--
- The following are not yet "wired up" in JournalImpl.cpp
--->
- <statistic name="freeFileCount" type="hilo32"
unit="file" desc="Number of files free on this journal. Includes free
files trapped in holes."/>
- <statistic name="availableFileCount" type="hilo32"
unit="file" desc="Number of files available to be written. Excluding
holes"/>
- <statistic name="writeWaitFailures" type="count64"
unit="record" desc="AIO Wait failures on write"/>
- <statistic name="writeBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on write"/>
- <statistic name="readRecordCount" type="count64"
unit="record" desc="Records read from the journal"/>
- <statistic name="readBusyFailures" type="count64"
unit="record" desc="AIO Busy failures on read"/>
- <statistic name="writePageCacheDepth" type="hilo32"
unit="wpage" desc="Current depth of write-page-cache"/>
- <statistic name="readPageCacheDepth" type="hilo32"
unit="rpage" desc="Current depth of read-page-cache"/>
-
- <method name="expand" desc="Increase number of files allocated for
this journal">
- <arg name="by" type="uint32" dir="I"
desc="Number of files to increase journal size by"/>
- </method>
- </class>
-</schema>