rhmessaging commits: r3197 - in store/trunk/cpp/lib: gen/qmf/com/redhat/rhm/store and 1 other directories.
by rhmessaging-commits@lists.jboss.org
Author: kpvdr
Date: 2009-03-23 10:51:38 -0400 (Mon, 23 Mar 2009)
New Revision: 3197
Added:
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h
Modified:
store/trunk/cpp/lib/JournalImpl.cpp
store/trunk/cpp/lib/JournalImpl.h
store/trunk/cpp/lib/Makefile.am
store/trunk/cpp/lib/MessageStoreImpl.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h
store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.cpp
store/trunk/cpp/lib/jrnl/wmgr.hpp
store/trunk/cpp/lib/qmf-schema.xml
Log:
Added management agent events for journal enqueue threshold exceeded and journal full; also for journal create and recover events. Also added some auto-expand related management and added transaction depth. Fixed some typos in the comments.
Modified: store/trunk/cpp/lib/JournalImpl.cpp
===================================================================
--- store/trunk/cpp/lib/JournalImpl.cpp 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/JournalImpl.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -28,6 +28,10 @@
#include "qpid/log/Statement.h"
#include "qpid/agent/ManagementAgent.h"
#include "qmf/com/redhat/rhm/store/ArgsJournalExpand.h"
+#include "qmf/com/redhat/rhm/store/EventCreated.h"
+#include "qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h"
+#include "qmf/com/redhat/rhm/store/EventFull.h"
+#include "qmf/com/redhat/rhm/store/EventRecovered.h"
#include "qpid/sys/Monitor.h"
#include "StoreException.h"
@@ -70,11 +74,11 @@
journalTimerPtr->start();
journalTimerPtr->add(inactivityFireEventPtr);
- ManagementAgent* agent = ManagementAgent::Singleton::getInstance();
- if (agent != 0)
+ _agent = ManagementAgent::Singleton::getInstance();
+ if (_agent != 0)
{
_mgmtObject = new _qmf::Journal
- (agent, (qpid::management::Manageable*) this);
+ (_agent, (qpid::management::Manageable*) this);
_mgmtObject->set_name(journalId);
_mgmtObject->set_directory(journalDirectory);
@@ -89,7 +93,7 @@
_mgmtObject->set_writePageSize(0);
_mgmtObject->set_writePages(0);
- agent->addObject(_mgmtObject);
+ _agent->addObject(_mgmtObject);
}
log(LOG_NOTICE, "Created");
@@ -142,11 +146,16 @@
if (_mgmtObject != 0)
{
_mgmtObject->set_initialFileCount(_lpmgr.num_jfiles());
+ _mgmtObject->set_autoExpand(_lpmgr.is_ae());
+ _mgmtObject->set_currentFileCount(_lpmgr.num_jfiles());
+ _mgmtObject->set_maxFileCount(_lpmgr.ae_max_jfiles());
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE);
- _mgmtObject->set_currentFileCount(_lpmgr.num_jfiles());
_mgmtObject->set_writePageSize(wcache_pgsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE);
_mgmtObject->set_writePages(wcache_num_pages);
}
+ if (_agent != 0)
+ _agent->raiseEvent(qmf::com::redhat::rhm::store::EventCreated(_jid, _jfsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE, _lpmgr.num_jfiles()),
+ qpid::management::ManagementAgent::SEV_NOTE);
}
void
@@ -171,8 +180,10 @@
if (_mgmtObject != 0)
{
_mgmtObject->set_initialFileCount(_lpmgr.num_jfiles());
+ _mgmtObject->set_autoExpand(_lpmgr.is_ae());
+ _mgmtObject->set_currentFileCount(_lpmgr.num_jfiles());
+ _mgmtObject->set_maxFileCount(_lpmgr.ae_max_jfiles());
_mgmtObject->set_dataFileSize(_jfsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE);
- _mgmtObject->set_currentFileCount(_lpmgr.num_jfiles());
_mgmtObject->set_writePageSize(wcache_pgsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE);
_mgmtObject->set_writePages(wcache_num_pages);
}
@@ -222,6 +233,7 @@
{
_mgmtObject->inc_recordDepth(_emap.size());
_mgmtObject->inc_enqueues(_emap.size());
+ _mgmtObject->inc_txn(_tmap.size());
_mgmtObject->inc_txnEnqueues(_tmap.enq_cnt());
_mgmtObject->inc_txnDequeues(_tmap.deq_cnt());
}
@@ -232,6 +244,9 @@
{
jcntl::recover_complete();
log(LOG_DEBUG, "Recover phase 2 complete; journal now writable.");
+ if (_agent != 0)
+ _agent->raiseEvent(qmf::com::redhat::rhm::store::EventRecovered(_jid, _jfsize_sblks * JRNL_SBLK_SIZE * JRNL_DBLK_SIZE, _lpmgr.num_jfiles(),
+ _emap.size(), _tmap.size(), _tmap.enq_cnt(), _tmap.deq_cnt()), qpid::management::ManagementAgent::SEV_NOTE);
}
#define MAX_AIO_SLEEPS 1000 // 10 sec
@@ -244,7 +259,7 @@
// Free any previous msg
free_read_buffers();
- // TODO: This is a brutal approach - very inefficient and slow. Rather intruduce a system of remembering
+ // TODO: This is a brutal approach - very inefficient and slow. Rather introduce a system of remembering
// jumpover points and allow the read to jump back to the first known jumpover point - but this needs
// a mechanism in rrfc to accomplish it. Also helpful is a struct containing a journal address - a
// combination of lid/offset.
@@ -346,10 +361,14 @@
JournalImpl::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)
{
+ bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+
handleIoResult(jcntl::enqueue_txn_data_record(data_buff, tot_data_len, this_data_len, dtokp, xid, transient));
if (_mgmtObject != 0)
{
+ if (txn_incr)
+ _mgmtObject->inc_txn();
_mgmtObject->inc_enqueues();
_mgmtObject->inc_txnEnqueues();
_mgmtObject->inc_recordDepth();
@@ -360,10 +379,14 @@
JournalImpl::enqueue_extern_txn_data_record(const size_t tot_data_len, data_tok* dtokp,
const std::string& xid, const bool transient)
{
+ bool txn_incr = _mgmtObject != 0 ? _tmap.in_map(xid) : false;
+
handleIoResult(jcntl::enqueue_extern_txn_data_record(tot_data_len, dtokp, xid, transient));
if (_mgmtObject != 0)
{
+ if (txn_incr)
+ _mgmtObject->inc_txn();
_mgmtObject->inc_enqueues();
_mgmtObject->inc_txnEnqueues();
_mgmtObject->inc_recordDepth();
@@ -402,7 +425,10 @@
handleIoResult(jcntl::txn_abort(dtokp, xid));
if (_mgmtObject != 0)
+ {
+ _mgmtObject->dec_txn();
_mgmtObject->inc_txnAborts();
+ }
}
void
@@ -411,7 +437,10 @@
handleIoResult(jcntl::txn_commit(dtokp, xid));
if (_mgmtObject != 0)
+ {
+ _mgmtObject->dec_txn();
_mgmtObject->inc_txnCommits();
+ }
}
void
@@ -536,6 +565,9 @@
std::ostringstream oss;
oss << "Enqueue capacity threshold exceeded on queue \"" << _jid << "\".";
log(LOG_WARN, oss.str());
+ if (_agent != 0)
+ _agent->raiseEvent(qmf::com::redhat::rhm::store::EventEnqThresholdExceeded(_jid, "Journal enqueue capacity threshold exceeded"),
+ qpid::management::ManagementAgent::SEV_WARN);
THROW_STORE_FULL_EXCEPTION(oss.str());
}
case mrg::journal::RHM_IORES_FULL:
@@ -543,6 +575,8 @@
std::ostringstream oss;
oss << "Journal full on queue \"" << _jid << "\".";
log(LOG_CRITICAL, oss.str());
+ if (_agent != 0)
+ _agent->raiseEvent(qmf::com::redhat::rhm::store::EventFull(_jid, "Journal full"), qpid::management::ManagementAgent::SEV_ERROR);
THROW_STORE_FULL_EXCEPTION(oss.str());
}
default:
Modified: store/trunk/cpp/lib/JournalImpl.h
===================================================================
--- store/trunk/cpp/lib/JournalImpl.h 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/JournalImpl.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -90,6 +90,8 @@
size_t _dlen;
journal::data_tok _dtok;
bool _external;
+
+ qpid::management::ManagementAgent* _agent;
qmf::com::redhat::rhm::store::Journal* _mgmtObject;
public:
Modified: store/trunk/cpp/lib/Makefile.am
===================================================================
--- store/trunk/cpp/lib/Makefile.am 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/Makefile.am 2009-03-23 14:51:38 UTC (rev 3197)
@@ -125,6 +125,14 @@
jrnl/txn_rec.hpp \
jrnl/wmgr.hpp \
jrnl/wrfc.hpp \
+ gen/qmf/com/redhat/rhm/store/EventCreated.cpp \
+ gen/qmf/com/redhat/rhm/store/EventCreated.h \
+ gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp \
+ gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h \
+ gen/qmf/com/redhat/rhm/store/EventFull.cpp \
+ gen/qmf/com/redhat/rhm/store/EventFull.h \
+ gen/qmf/com/redhat/rhm/store/EventRecovered.cpp \
+ gen/qmf/com/redhat/rhm/store/EventRecovered.h \
gen/qmf/com/redhat/rhm/store/Package.cpp \
gen/qmf/com/redhat/rhm/store/Package.h \
gen/qmf/com/redhat/rhm/store/Journal.cpp \
Modified: store/trunk/cpp/lib/MessageStoreImpl.cpp
===================================================================
--- store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/MessageStoreImpl.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -425,7 +425,7 @@
value = args.get("qpid.file_size");
if (value.get() != 0 && !value->empty() && value->convertsTo<int>())
localFileSizeSblks = (u_int32_t) value->get<int>() * JRNL_RMGR_PAGE_SIZE;
-
+
if (queue.getName().size() == 0)
{
QPID_LOG(error, "Cannot create store for empty (null) queue name - ignoring and attempting to continue.");
@@ -711,7 +711,7 @@
{
QPID_LOG(error, "Cannot recover empty (null) queue name - ignoring and attempting to continue.");
break;
- }
+ }
{
qpid::sys::Mutex::ScopedLock sl(jrnlCreateLock);
jQueue = new JournalImpl(queueName, getJrnlDir(queueName), std::string("JournalData"), defJournalGetEventsTimeout, defJournalFlushTimeout);
@@ -1056,7 +1056,7 @@
// another thread on one of the active queues by the time the get_tdata_list() call below is made.
// Since reading the TPL is not considered a high-speed operation and is used for recovery and other
// infrequent uses, the following try-catch will work as well as attempting to lock down the
- // entire transaction map for this operation - but with less complixity.
+ // entire transaction map for this operation - but with less complexity.
try {
journal::txn_data_list txnList = tmap.get_tdata_list(xid);
unsigned enqCnt = 0;
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,103 @@
+
+//
+// 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 "EventCreated.h"
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string EventCreated::packageName = string ("com.redhat.rhm.store");
+string EventCreated::eventName = string ("created");
+uint8_t EventCreated::md5Sum[16] =
+ {0x6f,0x7,0x35,0xf6,0xdc,0xa3,0x18,0x29,0x23,0xf0,0x19,0x61,0xcc,0xe7,0x1c,0x5b};
+
+EventCreated::EventCreated (const std::string& _jrnlId,
+ const uint32_t _fileSize,
+ const uint16_t _numFiles) :
+ jrnlId(_jrnlId),
+ fileSize(_fileSize),
+ numFiles(_numFiles)
+{}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+}
+
+void EventCreated::registerSelf(ManagementAgent* agent)
+{
+ agent->registerEvent(packageName, eventName, md5Sum, writeSchema);
+}
+
+void EventCreated::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putOctet (CLASS_KIND_EVENT);
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (eventName); // Event Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (3); // Argument Count
+
+ // Arguments
+ ft.clear();
+ ft.setString (NAME, "jrnlId");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Journal Id");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "fileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Journal file size in bytes");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numFiles");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setString (DESC, "Number of journal files");
+ buf.put (ft);
+
+
+}
+
+void EventCreated::encode(::qpid::framing::Buffer& buf) const
+{
+ buf.putShortString(jrnlId);
+ buf.putLong(fileSize);
+ buf.putShort(numFiles);
+
+}
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventCreated.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,69 @@
+
+#ifndef _MANAGEMENT_CREATED_
+#define _MANAGEMENT_CREATED_
+
+//
+// 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/ManagementEvent.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class EventCreated : public ::qpid::management::ManagementEvent
+{
+ private:
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ static std::string packageName;
+ static std::string eventName;
+ static uint8_t md5Sum[16];
+
+ const std::string& jrnlId;
+ const uint32_t fileSize;
+ const uint16_t numFiles;
+
+
+ public:
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ EventCreated(const std::string& _jrnlId,
+ const uint32_t _fileSize,
+ const uint16_t _numFiles);
+ ~EventCreated() {};
+
+ static void registerSelf(::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName() const { return packageName; }
+ std::string& getEventName() const { return eventName; }
+ uint8_t* getMd5Sum() const { return md5Sum; }
+ uint8_t getSeverity() const { return 5; }
+ void encode(::qpid::framing::Buffer& buffer) const;
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_CREATED_*/
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,94 @@
+
+//
+// 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 "EventEnqThresholdExceeded.h"
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string EventEnqThresholdExceeded::packageName = string ("com.redhat.rhm.store");
+string EventEnqThresholdExceeded::eventName = string ("enqThresholdExceeded");
+uint8_t EventEnqThresholdExceeded::md5Sum[16] =
+ {0x5b,0x1f,0xd4,0x87,0x9c,0xf6,0x1e,0xc3,0xdc,0x3e,0xc4,0x4,0x49,0xf3,0xa8,0xf3};
+
+EventEnqThresholdExceeded::EventEnqThresholdExceeded (const std::string& _jrnlId,
+ const std::string& _what) :
+ jrnlId(_jrnlId),
+ what(_what)
+{}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+}
+
+void EventEnqThresholdExceeded::registerSelf(ManagementAgent* agent)
+{
+ agent->registerEvent(packageName, eventName, md5Sum, writeSchema);
+}
+
+void EventEnqThresholdExceeded::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putOctet (CLASS_KIND_EVENT);
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (eventName); // Event Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (2); // Argument Count
+
+ // Arguments
+ ft.clear();
+ ft.setString (NAME, "jrnlId");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Journal Id");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "what");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Description of event");
+ buf.put (ft);
+
+
+}
+
+void EventEnqThresholdExceeded::encode(::qpid::framing::Buffer& buf) const
+{
+ buf.putShortString(jrnlId);
+ buf.putShortString(what);
+
+}
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventEnqThresholdExceeded.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,67 @@
+
+#ifndef _MANAGEMENT_ENQTHRESHOLDEXCEEDED_
+#define _MANAGEMENT_ENQTHRESHOLDEXCEEDED_
+
+//
+// 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/ManagementEvent.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class EventEnqThresholdExceeded : public ::qpid::management::ManagementEvent
+{
+ private:
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ static std::string packageName;
+ static std::string eventName;
+ static uint8_t md5Sum[16];
+
+ const std::string& jrnlId;
+ const std::string& what;
+
+
+ public:
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ EventEnqThresholdExceeded(const std::string& _jrnlId,
+ const std::string& _what);
+ ~EventEnqThresholdExceeded() {};
+
+ static void registerSelf(::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName() const { return packageName; }
+ std::string& getEventName() const { return eventName; }
+ uint8_t* getMd5Sum() const { return md5Sum; }
+ uint8_t getSeverity() const { return 4; }
+ void encode(::qpid::framing::Buffer& buffer) const;
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_ENQTHRESHOLDEXCEEDED_*/
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,94 @@
+
+//
+// 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 "EventFull.h"
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string EventFull::packageName = string ("com.redhat.rhm.store");
+string EventFull::eventName = string ("full");
+uint8_t EventFull::md5Sum[16] =
+ {0x23,0x4c,0x70,0xc1,0xb0,0xeb,0x4e,0x5d,0x72,0x37,0x56,0x60,0xc3,0x10,0x78,0x68};
+
+EventFull::EventFull (const std::string& _jrnlId,
+ const std::string& _what) :
+ jrnlId(_jrnlId),
+ what(_what)
+{}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+}
+
+void EventFull::registerSelf(ManagementAgent* agent)
+{
+ agent->registerEvent(packageName, eventName, md5Sum, writeSchema);
+}
+
+void EventFull::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putOctet (CLASS_KIND_EVENT);
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (eventName); // Event Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (2); // Argument Count
+
+ // Arguments
+ ft.clear();
+ ft.setString (NAME, "jrnlId");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Journal Id");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "what");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Description of event");
+ buf.put (ft);
+
+
+}
+
+void EventFull::encode(::qpid::framing::Buffer& buf) const
+{
+ buf.putShortString(jrnlId);
+ buf.putShortString(what);
+
+}
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.h (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventFull.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,67 @@
+
+#ifndef _MANAGEMENT_FULL_
+#define _MANAGEMENT_FULL_
+
+//
+// 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/ManagementEvent.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class EventFull : public ::qpid::management::ManagementEvent
+{
+ private:
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ static std::string packageName;
+ static std::string eventName;
+ static uint8_t md5Sum[16];
+
+ const std::string& jrnlId;
+ const std::string& what;
+
+
+ public:
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ EventFull(const std::string& _jrnlId,
+ const std::string& _what);
+ ~EventFull() {};
+
+ static void registerSelf(::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName() const { return packageName; }
+ std::string& getEventName() const { return eventName; }
+ uint8_t* getMd5Sum() const { return md5Sum; }
+ uint8_t getSeverity() const { return 3; }
+ void encode(::qpid::framing::Buffer& buffer) const;
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_FULL_*/
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,139 @@
+
+//
+// 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 "EventRecovered.h"
+
+using namespace qmf::com::redhat::rhm::store;
+using namespace qpid::framing;
+using qpid::management::ManagementAgent;
+using qpid::management::Manageable;
+using qpid::management::ManagementObject;
+using qpid::management::Args;
+using std::string;
+
+string EventRecovered::packageName = string ("com.redhat.rhm.store");
+string EventRecovered::eventName = string ("recovered");
+uint8_t EventRecovered::md5Sum[16] =
+ {0x23,0x28,0x44,0x5a,0x72,0xb0,0x1e,0xda,0x7d,0xff,0x0,0x9,0x1,0x6d,0xa8,0xd4};
+
+EventRecovered::EventRecovered (const std::string& _jrnlId,
+ const uint32_t _fileSize,
+ const uint16_t _numFiles,
+ const uint32_t _numEnq,
+ const uint32_t _numTxn,
+ const uint32_t _numTxnEnq,
+ const uint32_t _numTxnDeq) :
+ jrnlId(_jrnlId),
+ fileSize(_fileSize),
+ numFiles(_numFiles),
+ numEnq(_numEnq),
+ numTxn(_numTxn),
+ numTxnEnq(_numTxnEnq),
+ numTxnDeq(_numTxnDeq)
+{}
+
+namespace {
+ const string NAME("name");
+ const string TYPE("type");
+ const string DESC("desc");
+ const string ARGCOUNT("argCount");
+ const string ARGS("args");
+}
+
+void EventRecovered::registerSelf(ManagementAgent* agent)
+{
+ agent->registerEvent(packageName, eventName, md5Sum, writeSchema);
+}
+
+void EventRecovered::writeSchema (Buffer& buf)
+{
+ FieldTable ft;
+
+ // Schema class header:
+ buf.putOctet (CLASS_KIND_EVENT);
+ buf.putShortString (packageName); // Package Name
+ buf.putShortString (eventName); // Event Name
+ buf.putBin128 (md5Sum); // Schema Hash
+ buf.putShort (7); // Argument Count
+
+ // Arguments
+ ft.clear();
+ ft.setString (NAME, "jrnlId");
+ ft.setInt (TYPE, TYPE_SSTR);
+ ft.setString (DESC, "Journal Id");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "fileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Journal file size in bytes");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numFiles");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setString (DESC, "Number of journal files");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numEnq");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Number of recovered enqueues");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numTxn");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Number of recovered transactions");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numTxnEnq");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Number of recovered transactional enqueues");
+ buf.put (ft);
+
+ ft.clear();
+ ft.setString (NAME, "numTxnDeq");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (DESC, "Number of recovered transactional dequeues");
+ buf.put (ft);
+
+
+}
+
+void EventRecovered::encode(::qpid::framing::Buffer& buf) const
+{
+ buf.putShortString(jrnlId);
+ buf.putLong(fileSize);
+ buf.putShort(numFiles);
+ buf.putLong(numEnq);
+ buf.putLong(numTxn);
+ buf.putLong(numTxnEnq);
+ buf.putLong(numTxnDeq);
+
+}
Added: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h (rev 0)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/EventRecovered.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -0,0 +1,77 @@
+
+#ifndef _MANAGEMENT_RECOVERED_
+#define _MANAGEMENT_RECOVERED_
+
+//
+// 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/ManagementEvent.h"
+#include "qpid/framing/FieldTable.h"
+#include "qpid/framing/Uuid.h"
+
+namespace qmf {
+namespace com {
+namespace redhat {
+namespace rhm {
+namespace store {
+
+
+class EventRecovered : public ::qpid::management::ManagementEvent
+{
+ private:
+ static void writeSchema (::qpid::framing::Buffer& buf);
+ static std::string packageName;
+ static std::string eventName;
+ static uint8_t md5Sum[16];
+
+ const std::string& jrnlId;
+ const uint32_t fileSize;
+ const uint16_t numFiles;
+ const uint32_t numEnq;
+ const uint32_t numTxn;
+ const uint32_t numTxnEnq;
+ const uint32_t numTxnDeq;
+
+
+ public:
+ writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; }
+
+ EventRecovered(const std::string& _jrnlId,
+ const uint32_t _fileSize,
+ const uint16_t _numFiles,
+ const uint32_t _numEnq,
+ const uint32_t _numTxn,
+ const uint32_t _numTxnEnq,
+ const uint32_t _numTxnDeq);
+ ~EventRecovered() {};
+
+ static void registerSelf(::qpid::management::ManagementAgent* agent);
+ std::string& getPackageName() const { return packageName; }
+ std::string& getEventName() const { return eventName; }
+ uint8_t* getMd5Sum() const { return md5Sum; }
+ uint8_t getSeverity() const { return 5; }
+ void encode(::qpid::framing::Buffer& buffer) const;
+};
+
+}}}}}
+
+#endif /*!_MANAGEMENT_RECOVERED_*/
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -40,7 +40,7 @@
string Journal::packageName = string ("com.redhat.rhm.store");
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};
+ {0x9,0xc2,0xe2,0xfc,0xcc,0x2e,0x72,0xaa,0x3f,0xce,0x36,0x28,0xce,0x81,0xc,0xd4};
Journal::Journal (ManagementAgent* _agent, Manageable* _core) :
ManagementObject(_agent, _core)
@@ -55,8 +55,10 @@
readPageSize = 0;
readPages = 0;
initialFileCount = 0;
+ autoExpand = 0;
+ currentFileCount = 0;
+ maxFileCount = 0;
dataFileSize = 0;
- currentFileCount = 0;
recordDepth = 0;
recordDepthHigh = 0;
recordDepthLow = 0;
@@ -126,8 +128,8 @@
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 (13); // Config Element Count
+ buf.putShort (29); // Inst Element Count
buf.putShort (1); // Method Count
// Properties
@@ -216,18 +218,17 @@
buf.put (ft);
ft.clear();
- ft.setString (NAME, "dataFileSize");
- ft.setInt (TYPE, TYPE_U32);
+ ft.setString (NAME, "autoExpand");
+ ft.setInt (TYPE, TYPE_BOOL);
ft.setInt (ACCESS, ACCESS_RO);
ft.setInt (IS_INDEX, 0);
ft.setInt (IS_OPTIONAL, 0);
- ft.setString (UNIT, "byte");
- ft.setString (DESC, "Size of each journal data file");
+ ft.setString (DESC, "Auto-expand enabled");
buf.put (ft);
ft.clear();
ft.setString (NAME, "currentFileCount");
- ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (TYPE, TYPE_U16);
ft.setInt (ACCESS, ACCESS_RO);
ft.setInt (IS_INDEX, 0);
ft.setInt (IS_OPTIONAL, 0);
@@ -235,7 +236,27 @@
ft.setString (DESC, "Number of files currently allocated to this journal");
buf.put (ft);
+ ft.clear();
+ ft.setString (NAME, "maxFileCount");
+ ft.setInt (TYPE, TYPE_U16);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (IS_INDEX, 0);
+ ft.setInt (IS_OPTIONAL, 0);
+ ft.setString (UNIT, "file");
+ ft.setString (DESC, "Max number of files allowed for this journal");
+ buf.put (ft);
+ ft.clear();
+ ft.setString (NAME, "dataFileSize");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setInt (ACCESS, ACCESS_RO);
+ ft.setInt (IS_INDEX, 0);
+ ft.setInt (IS_OPTIONAL, 0);
+ ft.setString (UNIT, "byte");
+ ft.setString (DESC, "Size of each journal data file");
+ buf.put (ft);
+
+
// Statistics
ft.clear();
ft.setString (NAME, "recordDepth");
@@ -273,6 +294,13 @@
buf.put (ft);
ft.clear();
+ ft.setString (NAME, "txn");
+ ft.setInt (TYPE, TYPE_U32);
+ ft.setString (UNIT, "record");
+ ft.setString (DESC, "Total open transactions (xids) on journal");
+ buf.put (ft);
+
+ ft.clear();
ft.setString (NAME, "txnEnqueues");
ft.setInt (TYPE, TYPE_U64);
ft.setString (UNIT, "record");
@@ -456,6 +484,7 @@
{
totals->enqueues = 0;
totals->dequeues = 0;
+ totals->txn = 0;
totals->txnEnqueues = 0;
totals->txnDequeues = 0;
totals->txnCommits = 0;
@@ -470,6 +499,7 @@
if (threadStats != 0) {
totals->enqueues += threadStats->enqueues;
totals->dequeues += threadStats->dequeues;
+ totals->txn += threadStats->txn;
totals->txnEnqueues += threadStats->txnEnqueues;
totals->txnDequeues += threadStats->txnDequeues;
totals->txnCommits += threadStats->txnCommits;
@@ -500,8 +530,10 @@
buf.putLong(readPageSize);
buf.putLong(readPages);
buf.putShort(initialFileCount);
+ buf.putOctet(autoExpand?1:0);
+ buf.putShort(currentFileCount);
+ buf.putShort(maxFileCount);
buf.putLong(dataFileSize);
- buf.putLong(currentFileCount);
}
@@ -522,6 +554,7 @@
buf.putLong(recordDepthLow);
buf.putLongLong(totals.enqueues);
buf.putLongLong(totals.dequeues);
+ buf.putLong(totals.txn);
buf.putLongLong(totals.txnEnqueues);
buf.putLongLong(totals.txnDequeues);
buf.putLongLong(totals.txnCommits);
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Journal.h 2009-03-23 14:51:38 UTC (rev 3197)
@@ -54,8 +54,10 @@
uint32_t readPageSize;
uint32_t readPages;
uint16_t initialFileCount;
+ uint8_t autoExpand;
+ uint16_t currentFileCount;
+ uint16_t maxFileCount;
uint32_t dataFileSize;
- uint32_t currentFileCount;
// Statistics
uint32_t recordDepth;
@@ -82,6 +84,7 @@
struct PerThreadStats {
uint64_t enqueues;
uint64_t dequeues;
+ uint32_t txn;
uint64_t txnEnqueues;
uint64_t txnDequeues;
uint64_t txnCommits;
@@ -103,6 +106,7 @@
perThreadStatsArray[idx] = threadStats;
threadStats->enqueues = 0;
threadStats->dequeues = 0;
+ threadStats->txn = 0;
threadStats->txnEnqueues = 0;
threadStats->txnDequeues = 0;
threadStats->txnCommits = 0;
@@ -227,24 +231,42 @@
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
return initialFileCount;
}
- inline void set_dataFileSize (uint32_t val) {
+ inline void set_autoExpand (uint8_t val) {
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
- dataFileSize = val;
+ autoExpand = val;
configChanged = true;
}
- inline uint32_t get_dataFileSize() {
+ inline uint8_t get_autoExpand() {
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
- return dataFileSize;
+ return autoExpand;
}
- inline void set_currentFileCount (uint32_t val) {
+ inline void set_currentFileCount (uint16_t val) {
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
currentFileCount = val;
configChanged = true;
}
- inline uint32_t get_currentFileCount() {
+ inline uint16_t get_currentFileCount() {
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
return currentFileCount;
}
+ inline void set_maxFileCount (uint16_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ maxFileCount = val;
+ configChanged = true;
+ }
+ inline uint16_t get_maxFileCount() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return maxFileCount;
+ }
+ inline void set_dataFileSize (uint32_t val) {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ dataFileSize = val;
+ configChanged = true;
+ }
+ inline uint32_t get_dataFileSize() {
+ ::qpid::sys::Mutex::ScopedLock mutex(accessLock);
+ return dataFileSize;
+ }
inline void inc_recordDepth (uint32_t by = 1) {
::qpid::sys::Mutex::ScopedLock mutex(accessLock);
recordDepth += by;
@@ -275,6 +297,14 @@
getThreadStats()->dequeues -= by;
instChanged = true;
}
+ inline void inc_txn (uint32_t by = 1) {
+ getThreadStats()->txn += by;
+ instChanged = true;
+ }
+ inline void dec_txn (uint32_t by = 1) {
+ getThreadStats()->txn -= by;
+ instChanged = true;
+ }
inline void inc_txnEnqueues (uint64_t by = 1) {
getThreadStats()->txnEnqueues += by;
instChanged = true;
Modified: store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.cpp
===================================================================
--- store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.cpp 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/gen/qmf/com/redhat/rhm/store/Package.cpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -24,6 +24,10 @@
#include "Package.h"
#include "Store.h"
#include "Journal.h"
+#include "EventEnqThresholdExceeded.h"
+#include "EventCreated.h"
+#include "EventFull.h"
+#include "EventRecovered.h"
using namespace qmf::com::redhat::rhm::store;
@@ -32,6 +36,10 @@
{
Store::registerSelf(agent);
Journal::registerSelf(agent);
+ EventEnqThresholdExceeded::registerSelf(agent);
+ EventCreated::registerSelf(agent);
+ EventFull::registerSelf(agent);
+ EventRecovered::registerSelf(agent);
}
Modified: store/trunk/cpp/lib/jrnl/wmgr.hpp
===================================================================
--- store/trunk/cpp/lib/jrnl/wmgr.hpp 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/jrnl/wmgr.hpp 2009-03-23 14:51:38 UTC (rev 3197)
@@ -56,17 +56,17 @@
* \brief Class for managing a write page cache of arbitrary size and number of pages.
*
* The write page cache works on the principle of caching the write data within a page until
- * that page is either full or flushed; this initiates a sinlge AIO write operation to store
+ * that page is either full or flushed; this initiates a single AIO write operation to store
* the data on disk.
*
- * The maximum disk troughput is acheived by keeping the write operations of uniform size.
+ * The maximum disk throughput is achieved by keeping the write operations of uniform size.
* Waiting for a page cache to fill achieves this; and in high data volume/throughput situations
* achieves the optimal disk throughput. Calling flush() forces a write of the current page cache
* no matter how full it is, and disrupts the uniformity of the write operations. This should
* normally only be done if throughput drops and there is a danger of a page of unwritten data
* waiting around for excessive time.
*
- * The usual tradeoff between data storage latency and thoughput performance applies.
+ * The usual tradeoff between data storage latency and throughput performance applies.
*/
class wmgr : public pmgr
{
Modified: store/trunk/cpp/lib/qmf-schema.xml
===================================================================
--- store/trunk/cpp/lib/qmf-schema.xml 2009-03-23 12:55:48 UTC (rev 3196)
+++ store/trunk/cpp/lib/qmf-schema.xml 2009-03-23 14:51:38 UTC (rev 3197)
@@ -53,12 +53,15 @@
<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="autoExpand" type="bool" access="RO" desc="Auto-expand enabled"/>
+ <property name="currentFileCount" type="uint16" access="RO" unit="file" desc="Number of files currently allocated to this journal"/>
+ <property name="maxFileCount" type="uint16" access="RO" unit="file" desc="Max number of files allowed for 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="txn" type="count32" unit="record" desc="Total open transactions (xids) 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"/>
@@ -81,4 +84,20 @@
<arg name="by" type="uint32" dir="I" desc="Number of files to increase journal size by"/>
</method>
</class>
+
+ <eventArguments>
+ <arg name="autoExpand" type="bool" desc="Journal auto-expand enabled"/>
+ <arg name="fileSize" type="uint32" desc="Journal file size in bytes"/>
+ <arg name="jrnlId" type="sstr" desc="Journal Id"/>
+ <arg name="numEnq" type="uint32" desc="Number of recovered enqueues"/>
+ <arg name="numFiles" type="uint16" desc="Number of journal files"/>
+ <arg name="numTxn" type="uint32" desc="Number of recovered transactions"/>
+ <arg name="numTxnDeq" type="uint32" desc="Number of recovered transactional dequeues"/>
+ <arg name="numTxnEnq" type="uint32" desc="Number of recovered transactional enqueues"/>
+ <arg name="what" type="sstr" desc="Description of event"/>
+ </eventArguments>
+ <event name="enqThresholdExceeded" sev="warn" args="jrnlId, what"/>
+ <event name="created" sev="notice" args="jrnlId, fileSize, numFiles"/>
+ <event name="full" sev="error" args="jrnlId, what"/>
+ <event name="recovered" sev="notice" args="jrnlId, fileSize, numFiles, numEnq, numTxn, numTxnEnq, numTxnDeq"/>
</schema>
17 years, 1 month
rhmessaging commits: r3196 - store/branches/java/0.5-release/bdbstore/etc/scripts.
by rhmessaging-commits@lists.jboss.org
Author: ritchiem
Date: 2009-03-23 08:55:48 -0400 (Mon, 23 Mar 2009)
New Revision: 3196
Modified:
store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh
Log:
Update BDBTest Script to use qpid-run
Modified: store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh
===================================================================
--- store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh 2009-03-20 21:49:24 UTC (rev 3195)
+++ store/branches/java/0.5-release/bdbstore/etc/scripts/bdbtest.sh 2009-03-23 12:55:48 UTC (rev 3196)
@@ -1,5 +1,28 @@
#!/bin/bash
+#
+# 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.
+#
+if [ -z "$QPID_HOME" ]; then
+ export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
+ export PATH=${PATH}:${QPID_HOME}/bin
+fi
+
# Parse arguements taking all - prefixed args as JAVA_OPTS
for arg in "$@"; do
if [[ $arg == -java:* ]]; then
@@ -9,4 +32,12 @@
fi
done
-java -Xms256m -Dlog4j.configuration=perftests.log4j -Xmx256m -Dbadger.level=warn -Damqj.test.logging.level=warn -Damqj.logging.level=warn ${JAVA_OPTS} -cp qpid-bdbstore-1.0-incubating-M2-SNAPSHOT-all-test-deps.jar org.apache.qpid.ping.PingDurableClient -o $QPID_WORK/results ${ARGS}
+VERSION=0.5
+
+# Set classpath to include Qpid jar with all required jars in manifest
+QPID_LIBS=$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/qpid-junit-toolkit-$VERSION.jar:$QPID_HOME/lib/junit-3.8.1.jar:$QPID_HOME/lib/log4j-1.2.12.jar:$QPID_HOME/lib/qpid-perftests-$VERSION.jar:$QPID_HOME/lib/slf4j-log4j12-1.4.0.jar
+
+# Set other variables used by the qpid-run script before calling
+export JAVA=java JAVA_MEM=-Xmx256m QPID_CLASSPATH=$QPID_LIBS
+
+. qpid-run -Dlog4j.configuration=perftests.log4j -Dbadger.level=warn -Damqj.test.logging.level=warn -Damqj.logging.level=warn ${JAVA_OPTS} org.apache.qpid.ping.PingDurableClient -o $QPID_WORK/results ${ARGS}
17 years, 1 month
rhmessaging commits: r3195 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 17:49:24 -0400 (Fri, 20 Mar 2009)
New Revision: 3195
Modified:
mgmt/trunk/wooly/python/wooly/pages.py
mgmt/trunk/wooly/python/wooly/pages.strings
Log:
Only run update javascript if there are widgets requesting updates
Modified: mgmt/trunk/wooly/python/wooly/pages.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 21:47:57 UTC (rev 3194)
+++ mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 21:49:24 UTC (rev 3195)
@@ -79,6 +79,9 @@
self.updates = self.UpdatesAttribute(app, "updates")
self.add_attribute(self.updates)
+ self.update_script = UpdateScript(app, "update_script", self)
+ self.add_child(self.update_script)
+
self.update_page = UpdatePage(app, name + ".update", self)
self.app.add_page(self.update_page)
@@ -91,9 +94,6 @@
def enable_update(self, session, widget):
self.updates.get(session).append(widget)
- def render_update_url(self, session):
- return self.get_update_url(session, self.updates.get(session))
-
def get_update_url(self, session, widgets):
sess = Session(self.page.update_page)
@@ -106,6 +106,20 @@
def get_default(self, session):
return list()
+class UpdateScript(Widget):
+ def __init__(self, app, name, html_page):
+ super(UpdateScript, self).__init__(app, name)
+
+ self.html_page = html_page
+
+ def do_render(self, session):
+ if self.html_page.updates.get(session):
+ return super(UpdateScript, self).do_render(session)
+
+ def render_url(self, session):
+ updates = self.html_page.updates.get(session)
+ return self.html_page.get_update_url(session, updates)
+
class UpdatePage(Page):
def __init__(self, app, name, html_page):
super(UpdatePage, self).__init__(app, name)
Modified: mgmt/trunk/wooly/python/wooly/pages.strings
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.strings 2009-03-20 21:47:57 UTC (rev 3194)
+++ mgmt/trunk/wooly/python/wooly/pages.strings 2009-03-20 21:49:24 UTC (rev 3195)
@@ -16,18 +16,20 @@
<script type="text/javascript" src="resource?name=wooly.js"> </script>
<script type="text/javascript" src="resource?name=app.js"> </script>
- <script type="text/javascript" src="{id}.js"> </script>
- <script type="text/javascript">
- // <![CDATA[
- wooly.newSetIntervalUpdate('{update_url}', wooly.updatePage, 3000);
- // ]]>
- </script>
+ {update_script}
</head>
<body class="{class}">
{content}
</body>
</html>
+[UpdateScript.html]
+<script type="text/javascript">
+ // <![CDATA[
+ wooly.newSetIntervalUpdate('{url}', wooly.updatePage, 3000);
+ // ]]>
+</script>
+
[UpdatePage.html]
<?xml version="1.0" encoding="UTF-8"?>
<widgets>{widgets}</widgets>
17 years, 1 month
rhmessaging commits: r3194 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 17:47:57 -0400 (Fri, 20 Mar 2009)
New Revision: 3194
Modified:
mgmt/trunk/wooly/python/wooly/__init__.py
Log:
Turn a null do_render result into empty string
Modified: mgmt/trunk/wooly/python/wooly/__init__.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/__init__.py 2009-03-20 20:46:18 UTC (rev 3193)
+++ mgmt/trunk/wooly/python/wooly/__init__.py 2009-03-20 21:47:57 UTC (rev 3194)
@@ -251,6 +251,9 @@
args = self.get_args(session)
string = self.do_render(session, *args)
+ if string is None:
+ string = ""
+
if session.debug:
call.close()
@@ -781,6 +784,7 @@
return None
def render(self, writer, session, *args):
+ # XXX do this in an init method instead
if not self.__fragments:
self.__fragments = self.compile()
17 years, 1 month
rhmessaging commits: r3193 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 16:46:18 -0400 (Fri, 20 Mar 2009)
New Revision: 3193
Modified:
mgmt/trunk/cumin/resources/app.css
Log:
Whitespace cleanup
Modified: mgmt/trunk/cumin/resources/app.css
===================================================================
--- mgmt/trunk/cumin/resources/app.css 2009-03-20 20:42:33 UTC (rev 3192)
+++ mgmt/trunk/cumin/resources/app.css 2009-03-20 20:46:18 UTC (rev 3193)
@@ -1,470 +1,470 @@
body {
- margin: 0;
+ margin: 0;
}
body.modal {
- background-color: #f7f7f7;
+ background-color: #f7f7f7;
}
ul {
- list-style: none;
- padding: 0;
- margin: 0;
+ list-style: none;
+ padding: 0;
+ margin: 0;
}
ul > ul {
- padding: 1em;
+ padding: 1em;
}
h2 {
- margin: 0;
+ margin: 0;
}
span.none {
- font-style: italic;
- color: #999;
+ font-style: italic;
+ color: #999;
}
.oblock {
- padding: 0;
- background-color: white;
+ padding: 0;
+ background-color: white;
}
.iblock {
- margin: 1em 0;
- padding: 0 1em;
+ margin: 1em 0;
+ padding: 0 1em;
}
.notice {
- margin: 2em;
- padding: 2em;
- border: 1px dotted black;
- width: 66%;
- text-align: center;
+ margin: 2em;
+ padding: 2em;
+ border: 1px dotted black;
+ width: 66%;
+ text-align: center;
}
ul.actions {
- padding: 0;
- margin: 0 0 1em 0;
- list-style: none;
+ padding: 0;
+ margin: 0 0 1em 0;
+ list-style: none;
}
ul.actions li {
- display: inline;
+ display: inline;
}
ul.actions.disabled a {
- color: #666666;
+ color: #666666;
}
ul.actions.disabled li a.nav:before {
- color: #666666;
+ color: #666666;
}
ul.actions.disabled a:hover {
- background-color: #f7f7f7;
+ background-color: #f7f7f7;
}
a.nav:before {
- content: "\00BB \0020";
- font-weight: bold;
- color: #dc9f2e;
+ content: "\00BB \0020";
+ font-weight: bold;
+ color: #dc9f2e;
}
div.sactions {
- margin: 0;
- padding: 0.35em 0.75em;
- background-color: #e7e7f7;
+ margin: 0;
+ padding: 0.35em 0.75em;
+ background-color: #e7e7f7;
}
div.sactions h2 {
- display: inline;
- font-size: 0.9em;
- font-weight: normal;
- margin: 0 0.5em 0 0;
+ display: inline;
+ font-size: 0.9em;
+ font-weight: normal;
+ margin: 0 0.5em 0 0;
}
div.sactions select {
- margin: 0 0.5em 0 0;
+ margin: 0 0.5em 0 0;
}
div.mobject div.mactions h2 {
- display: inline;
- font-size: 0.9em;
- font-weight: normal;
- margin: 0 0.5em 0 0;
+ display: inline;
+ font-size: 0.9em;
+ font-weight: normal;
+ margin: 0 0.5em 0 0;
}
button, ul.actions a, a.action {
- margin: 0;
- border-top: 1px solid #ddd;
- border-left: 1px solid #ddd;
- border-bottom: 1px solid #bbb;
- border-right: 1px solid #bbb;
- padding: 0.25em 0.5em 0.30em 0.5em;
- background: url(resource?name=button-background.png) repeat;
- color: #000;
- font-size: 0.9em;
- -moz-border-radius: 0.4em;
- -webkit-border-radius: 0.4em;
+ margin: 0;
+ border-top: 1px solid #ddd;
+ border-left: 1px solid #ddd;
+ border-bottom: 1px solid #bbb;
+ border-right: 1px solid #bbb;
+ padding: 0.25em 0.5em 0.30em 0.5em;
+ background: url(resource?name=button-background.png) repeat;
+ color: #000;
+ font-size: 0.9em;
+ -moz-border-radius: 0.4em;
+ -webkit-border-radius: 0.4em;
}
button:hover, ul.actions a:hover, a.action:hover {
- background-color: white;
+ background-color: white;
}
button.disabled {
- color: #bbb;
- border: 1px solid #ddd;
+ color: #bbb;
+ border: 1px solid #ddd;
}
button.disabled:hover {
- background-color: #f7f7f7;
+ background-color: #f7f7f7;
}
ul.mobjects {
- list-style: none;
- margin: 0;
- padding: 0;
+ list-style: none;
+ margin: 0;
+ padding: 0;
}
ul.mobjects li {
- margin: 0;
- border-top: 1px solid #ccc;
- padding: 0.5em 0;
+ margin: 0;
+ border-top: 1px solid #ccc;
+ padding: 0.5em 0;
}
ul.mobjects li:first-child {
- margin: 0;
- border: none;
+ margin: 0;
+ border: none;
}
ul.mobjects li a.action {
- float: right;
+ float: right;
}
ul.mobjects .flags {
- font-size: small;
- font-style: italic;
+ font-size: small;
+ font-style: italic;
}
ul.mobjects .config {
- padding: 0 0 0 2em;
+ padding: 0 0 0 2em;
}
ul.mobjects .status {
- padding: 0 0 0 2em;
- color: #936;
+ padding: 0 0 0 2em;
+ color: #936;
}
table.mobjects {
- width: 100%;
- border-collapse: collapse;
- margin: 0;
+ width: 100%;
+ border-collapse: collapse;
+ margin: 0;
}
table.mobjects tr {
- border-top: 1px dotted #ccc;
- vertical-align: top;
+ border-top: 1px dotted #ccc;
+ vertical-align: top;
}
table.mobjects td {
- padding: 0.35em 0.5em;
+ padding: 0.35em 0.5em;
}
table.mobjects th {
- padding: 0.35em 0.5em;
+ padding: 0.35em 0.5em;
}
table.mobjects th {
- text-align: left;
- font-weight: normal;
- background-color: #f7f7f7;
+ text-align: left;
+ font-weight: normal;
+ background-color: #f7f7f7;
}
form.mform {
- width: 50em;
- border: 1px solid #ddd;
- background-color: #fff;
+ width: 50em;
+ border: 1px solid #ddd;
+ background-color: #fff;
}
form.mform fieldset {
- border: none;
- padding: 0.75em;
+ border: none;
+ padding: 0.75em;
}
form.mform .legend {
- font-weight: bold;
+ font-weight: bold;
}
form.mform .head, .mform .body, .mform .foot {
- padding: 0.5em 0.75em;
- margin: 0;
+ padding: 0.5em 0.75em;
+ margin: 0;
}
form.mform .head {
- font-weight: bold;
- color: white;
- background-color: #685b8a;
- /* background-color: #564979; */
+ font-weight: bold;
+ color: white;
+ background-color: #685b8a;
+/* background-color: #564979; */
}
form.mform .head h1 {
- margin: 0;
- font-size: 1.1em;
+ margin: 0;
+ font-size: 1.1em;
}
form.mform .foot {
- text-align: right;
- border-top: 1px solid #ddd;
+ text-align: right;
+ border-top: 1px solid #ddd;
}
form.mform .field {
- margin: 0.25em 0;
+ margin: 0.25em 0;
}
form.mform .field input {
- border-style: groove;
+ border-style: groove;
}
form.mform ul.errors {
- list-style: none;
- display: block;
- float: right;
- color: red;
- padding: 0.25em 0.5em;
- border: 1px solid red;
- margin: 0 0.5em;
- max-width: 20em;
+ list-style: none;
+ display: block;
+ float: right;
+ color: red;
+ padding: 0.25em 0.5em;
+ border: 1px solid red;
+ margin: 0 0.5em;
+ max-width: 20em;
}
form.mform button, form.mform a.help {
- margin: 0.5em;
- padding: 0.25em 0.25em 0 0.25em;
+ margin: 0.5em;
+ padding: 0.25em 0.25em 0 0.25em;
}
form.mform a.help {
- float: left;
- margin: 0.5em;
- padding: 0.25em 0.35em 0 0.5em;
+ float: left;
+ margin: 0.5em;
+ padding: 0.25em 0.35em 0 0.5em;
}
form.mform a.help:before {
- content: url(resource?name=help-20.png);
- padding: 0 0.25em 0 0;
- vertical-align: -35%;
+ content: url(resource?name=help-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
}
form.mform button.cancel:before {
- content: url(resource?name=cancel-20.png);
- padding: 0 0.25em 0 0;
- vertical-align: -35%;
+ content: url(resource?name=cancel-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
}
form.mform button.submit:before {
- content: url(resource?name=submit-20.png);
- padding: 0 0.25em 0 0;
- vertical-align: -35%;
+ content: url(resource?name=submit-20.png);
+ padding: 0 0.25em 0 0;
+ vertical-align: -35%;
}
form.mform td {
- vertical-align: top;
+ vertical-align: top;
}
ul.radiotabs {
- list-style: none;
- margin: 0 0 1em 0;
- padding: 0;
+ list-style: none;
+ margin: 0 0 1em 0;
+ padding: 0;
}
ul.radiotabs li {
- display: inline;
- padding: 0 0.75em 0 0;
+ display: inline;
+ padding: 0 0.75em 0 0;
}
ul.radiotabs li:last-child {
- display: inline;
- margin: 0;
+ display: inline;
+ margin: 0;
}
ul.radiotabs li a:before {
- content: url(resource?name=radio-button.png);
- margin: 0 0.5em 0 0;
- vertical-align: -15%;
+ content: url(resource?name=radio-button.png);
+ margin: 0 0.5em 0 0;
+ vertical-align: -15%;
}
ul.radiotabs li a.selected {
- color: black;
+ color: black;
}
ul.radiotabs li a.selected:before {
- content: url(resource?name=radio-button-checked.png);
+ content: url(resource?name=radio-button-checked.png);
}
ul.radiotabs li a.disabled:before {
- content: url(resource?name=radio-button.png);
+ content: url(resource?name=radio-button.png);
}
ul.radiotabs li a.disabled {
- color: #666666;
+ color: #666666;
}
div.statuslight {
- float: left;
- width: 1em;
- height: 1em;
- margin: 0.25em 1px 0 0;
- padding: 0.15em;
- font-size: 0.8em;
- text-align: center;
- line-height: 1.1em;
+ float: left;
+ width: 1em;
+ height: 1em;
+ margin: 0.25em 1px 0 0;
+ padding: 0.15em;
+ font-size: 0.8em;
+ text-align: center;
+ line-height: 1.1em;
}
div.statuslight.red {
- background-color: #e33;
- color: #fd3;
+ background-color: #e33;
+ color: #fd3;
}
div.statuslight.yellow {
- background-color: #fd3;
- color: #e33;
+ background-color: #fd3;
+ color: #e33;
}
div.statuslight.green {
- background-color: #9e9;
+ background-color: #9e9;
}
pre.code {
- background-color: #f7f7f7;
- padding: 1em;
- border: 1px dotted #ddd;
+ background-color: #f7f7f7;
+ padding: 1em;
+ border: 1px dotted #ddd;
}
ul.comma {
- list-style: none;
+ list-style: none;
}
ul.comma li {
- display: inline;
+ display: inline;
}
ul.comma li:after {
- content: ", ";
+ content: ", ";
}
ul.comma li:last-child:after {
- content: "";
+ content: "";
}
ul.slist a:before {
- content: url(resource?name=radio-button.png);
- vertical-align: -10%;
- margin: 0 0.5em 0 0;
+ content: url(resource?name=radio-button.png);
+ vertical-align: -10%;
+ margin: 0 0.5em 0 0;
}
ul.slist a.selected:before {
- content: url(resource?name=radio-button-checked.png);
+ content: url(resource?name=radio-button-checked.png);
}
table.twocol {
- width: 100%;
+ width: 100%;
}
table.twocol > tbody > tr > td {
- width: 50%;
- vertical-align: top;
+ width: 50%;
+ vertical-align: top;
}
table.twocol > tbody > tr > td:first-child {
- padding: 0 1.5em 0 0;
+ padding: 0 1.5em 0 0;
}
table.twocol > tbody > tr > td:last-child {
- padding: 0 0 0 1.5em;
+ padding: 0 0 0 1.5em;
}
.ralign, table.mobjects .ralign, div.mstatus table .ralign {
- text-align: right;
+ text-align: right;
}
form.inline {
- display: inline;
+ display: inline;
}
span.count {
- font-size: 0.9em;
- color: #999;
+ font-size: 0.9em;
+ color: #999;
}
.rfloat {
- float: right;
+ float: right;
}
.rclear {
- font-size:0.01em;
- width: 0.01px;
- clear:right;
- line-height:0.01px;
+ font-size:0.01em;
+ width: 0.01px;
+ clear:right;
+ line-height:0.01px;
}
table.Editable input.edit_string,
table.Editable textarea.edit_bigstring,
div.inline_help span.edit_string {
- border: 1px solid #CCCCCC;
+ border: 1px solid #CCCCCC;
}
table.Editable input.edit_number,
div.inline_help span.edit_number {
- border: 1px dashed #66CCFF;
-}
+ border: 1px dashed #66CCFF;
+}
table.Editable input.numeric_error,
div.inline_help span.numeric_error {
- border: 1px dashed #FF0000;
+ border: 1px dashed #FF0000;
}
table.Editable span.edit_readonly {
- background-color: #FFFFFF;
- color: #444444;
+ background-color: #FFFFFF;
+ color: #444444;
}
table.Editable input.edit_string,
table.Editable input.edit_number,
table.Editable input.numeric_error {
- width: 20em;
+ width: 20em;
}
table.Editable textarea.edit_bigstring {
- width: 25em;
+ width: 25em;
}
table.Editable div.error {
- color: #FF0000;
- font-size: 0.9em;
+ color: #FF0000;
+ font-size: 0.9em;
}
form.editform {
- border:0 none !important;
- width: 100% !important;
+ border: 0 none !important;
+ width: 100% !important;
}
div.inline_help {
- margin: 1em;
+ margin: 1em;
}
div.inline_help span.edit_string,
div.inline_help span.edit_number,
div.inline_help span.numeric_error {
- color: #444444;
- font-weight: normal;
- margin-right: 0.5em;
- padding:0.05em 0.2em;
-}
+ color: #444444;
+ font-weight: normal;
+ margin-right: 0.5em;
+ padding: 0.05em 0.2em;
+}
div.inline_help h2 {
- margin-right: 1em;
+ margin-right: 1em;
}
span.prop_example {
- font-size: 0.9em;
+ font-size: 0.9em;
}
span.prop_example:before {
- content: "Example:";
- padding-right: 0.25em;
+ content: "Example:";
+ padding-right: 0.25em;
}
17 years, 1 month
rhmessaging commits: r3192 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 16:42:33 -0400 (Fri, 20 Mar 2009)
New Revision: 3192
Modified:
mgmt/trunk/wooly/python/wooly/pages.py
Log:
Add comments with the source classes to compiled css and javascript
Modified: mgmt/trunk/wooly/python/wooly/pages.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 20:41:22 UTC (rev 3191)
+++ mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 20:42:33 UTC (rev 3192)
@@ -189,8 +189,12 @@
css = strs.get(cls.__name__ + ".css")
if css:
+ writer.write("/** %s.%s **/\r\n" % \
+ (cls.__module__, cls.__name__))
+ writer.write("\r\n")
writer.write(css)
- writer.write("\r\n") # HTTP newline
+ writer.write("\r\n")
+ writer.write("\r\n")
self.__css = writer.to_string()
@@ -224,8 +228,12 @@
javascript = strs.get(cls.__name__ + ".javascript")
if javascript:
+ writer.write("/** %s.%s **/\r\n" % \
+ (cls.__module__, cls.__name__))
+ writer.write("\r\n")
writer.write(javascript)
writer.write("\r\n")
+ writer.write("\r\n")
self.__javascript = writer.to_string()
17 years, 1 month
rhmessaging commits: r3191 - mgmt/trunk/cumin/resources.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 16:41:22 -0400 (Fri, 20 Mar 2009)
New Revision: 3191
Modified:
mgmt/trunk/cumin/resources/app.css
Log:
Fix the margin
Modified: mgmt/trunk/cumin/resources/app.css
===================================================================
--- mgmt/trunk/cumin/resources/app.css 2009-03-20 18:16:51 UTC (rev 3190)
+++ mgmt/trunk/cumin/resources/app.css 2009-03-20 20:41:22 UTC (rev 3191)
@@ -1,3 +1,7 @@
+body {
+ margin: 0;
+}
+
body.modal {
background-color: #f7f7f7;
}
17 years, 1 month
rhmessaging commits: r3190 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-20 14:16:51 -0400 (Fri, 20 Mar 2009)
New Revision: 3190
Modified:
mgmt/trunk/cumin/python/cumin/job.py
Log:
Escaping job hold/release/remove reason input value in case user enters quotes.
Modified: mgmt/trunk/cumin/python/cumin/job.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/job.py 2009-03-20 18:15:05 UTC (rev 3189)
+++ mgmt/trunk/cumin/python/cumin/job.py 2009-03-20 18:16:51 UTC (rev 3190)
@@ -1185,7 +1185,7 @@
return self.reason.path
def render_reason_value(self, session, *args):
- return self.reason.get(session)
+ return escape_entity(self.reason.get(session))
def render_reason_error(self, session, *args):
if self.error.get(session):
17 years, 1 month
rhmessaging commits: r3189 - mgmt/trunk/cumin/python/cumin.
by rhmessaging-commits@lists.jboss.org
Author: eallen
Date: 2009-03-20 14:15:05 -0400 (Fri, 20 Mar 2009)
New Revision: 3189
Modified:
mgmt/trunk/cumin/python/cumin/broker.py
mgmt/trunk/cumin/python/cumin/broker.strings
Log:
Escaping user input fields to avoid problems with quotes.
Added <input type="hidden"...> for the More Entries button since button values don't get sent in a form submit unless the button type is submit.
Modified: mgmt/trunk/cumin/python/cumin/broker.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.py 2009-03-20 15:38:56 UTC (rev 3188)
+++ mgmt/trunk/cumin/python/cumin/broker.py 2009-03-20 18:15:05 UTC (rev 3189)
@@ -625,7 +625,7 @@
def render_field_name_value(self, session, index):
names = self.names.get(session)
if len(names) > index:
- return names[index]
+ return escape_entity(names[index])
def render_field_name_errors(self, session, index):
errors = self.name_errors.get(session)
@@ -639,7 +639,7 @@
def render_field_address_value(self, session, index):
addrs = self.addrs.get(session)
if len(addrs) > index:
- return addrs[index]
+ return escape_entity(addrs[index])
def render_field_address_errors(self, session, index):
errors = self.addr_errors.get(session)
@@ -674,20 +674,6 @@
def render_content(self, session):
return "More Entries"
- def render_class(self, session):
- return "more"
-
- def render_type(self, session):
- """ using type="button" so pressing
- Enter on the form will not add more fields """
- return "button"
-
- def render_onclick(self, session):
- """ since this isn't a type="submit" button,
- we need javascript to submit the form when
- the button is clicked """
- return "click_more"
-
class BrokerSetAdd(BrokerSetForm):
def process_cancel(self, session):
branch = session.branch()
Modified: mgmt/trunk/cumin/python/cumin/broker.strings
===================================================================
--- mgmt/trunk/cumin/python/cumin/broker.strings 2009-03-20 15:38:56 UTC (rev 3188)
+++ mgmt/trunk/cumin/python/cumin/broker.strings 2009-03-20 18:15:05 UTC (rev 3189)
@@ -266,6 +266,9 @@
}())
</script>
+[MoreEntries.html]
+<input type="hidden" name="{name}" value="" />
+<button class="more" type="button" tabindex="{tab_index}" {disabled_attr} onclick="return click_more('{name}', '{value}')">{content}</button>
[BrokerSetForm.field_html]
<tr>
17 years, 1 month
rhmessaging commits: r3188 - mgmt/trunk/wooly/python/wooly.
by rhmessaging-commits@lists.jboss.org
Author: justi9
Date: 2009-03-20 11:38:56 -0400 (Fri, 20 Mar 2009)
New Revision: 3188
Modified:
mgmt/trunk/wooly/python/wooly/pages.py
Log:
Tighten up the plumbing between related pages, now that we have HtmlPage
Modified: mgmt/trunk/wooly/python/wooly/pages.py
===================================================================
--- mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 15:28:57 UTC (rev 3187)
+++ mgmt/trunk/wooly/python/wooly/pages.py 2009-03-20 15:38:56 UTC (rev 3188)
@@ -82,12 +82,10 @@
self.update_page = UpdatePage(app, name + ".update", self)
self.app.add_page(self.update_page)
- self.css_page = CssPage(app, name + ".css")
- self.css_page.html_page = self
+ self.css_page = CssPage(app, name + ".css", self)
self.app.add_page(self.css_page)
- self.javascript_page = JavascriptPage(app, name + ".js")
- self.javascript_page.html_page = self
+ self.javascript_page = JavascriptPage(app, name + ".js", self)
self.app.add_page(self.javascript_page)
def enable_update(self, session, widget):
@@ -167,10 +165,10 @@
return self.page.page_widgets_by_path.get(path)
class CssPage(Page):
- def __init__(self, app, name):
+ def __init__(self, app, name, html_page):
super(CssPage, self).__init__(app, name)
- self.html_page = None
+ self.html_page = html_page
self.__then = datetime.utcnow()
self.__css = None
@@ -202,10 +200,10 @@
return self.get_css()
class JavascriptPage(Page):
- def __init__(self, app, name):
+ def __init__(self, app, name, html_page):
super(JavascriptPage, self).__init__(app, name)
- self.html_page = None
+ self.html_page = html_page
self.__then = datetime.utcnow()
self.__javascript = None
17 years, 1 month