You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2009/07/30 16:06:50 UTC
svn commit: r799273 - in /qpid/trunk/qpid/cpp/src/qpid: broker/ cluster/
management/
Author: astitcher
Date: Thu Jul 30 14:06:49 2009
New Revision: 799273
URL: http://svn.apache.org/viewvc?rev=799273&view=rev
Log:
Change all broker users of broker::Timer to use sys::Timer
Modified:
qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.h
qpid/trunk/qpid/cpp/src/qpid/broker/DtxTimeout.h
qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h
qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h
qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp
qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h
qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp
qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h Thu Jul 30 14:06:49 2009
@@ -36,7 +36,6 @@
#include "qpid/broker/QueueEvents.h"
#include "qpid/broker/Vhost.h"
#include "qpid/broker/System.h"
-#include "qpid/broker/Timer.h"
#include "qpid/broker/ExpiryPolicy.h"
#include "qpid/management/Manageable.h"
#include "qpid/management/ManagementAgent.h"
@@ -49,6 +48,7 @@
#include "qpid/framing/OutputHandler.h"
#include "qpid/framing/ProtocolInitiation.h"
#include "qpid/sys/Runnable.h"
+#include "qpid/sys/Timer.h"
#include "qpid/RefCounted.h"
#include "qpid/broker/AclModule.h"
@@ -115,7 +115,7 @@
private:
std::string getHome();
};
-
+
private:
typedef std::map<std::string, boost::shared_ptr<sys::ProtocolFactory> > ProtocolFactoryMap;
@@ -132,7 +132,7 @@
ExchangeRegistry exchanges;
LinkRegistry links;
boost::shared_ptr<sys::ConnectionCodec::Factory> factory;
- Timer timer;
+ sys::Timer timer;
DtxManager dtxManager;
SessionManager sessionManager;
management::ManagementAgent* managementAgent;
@@ -148,8 +148,6 @@
boost::intrusive_ptr<ExpiryPolicy> expiryPolicy;
public:
-
-
virtual ~Broker();
QPID_BROKER_EXTERN Broker(const Options& configuration);
@@ -188,7 +186,7 @@
void setExpiryPolicy(const boost::intrusive_ptr<ExpiryPolicy>& e) { expiryPolicy = e; }
boost::intrusive_ptr<ExpiryPolicy> getExpiryPolicy() { return expiryPolicy; }
-
+
SessionManager& getSessionManager() { return sessionManager; }
const std::string& getFederationTag() const { return federationTag; }
@@ -197,7 +195,7 @@
management::Manageable::status_t ManagementMethod (uint32_t methodId,
management::Args& args,
std::string& text);
-
+
/** Add to the broker's protocolFactorys */
void registerProtocolFactory(const std::string& name, boost::shared_ptr<sys::ProtocolFactory>);
@@ -229,7 +227,7 @@
boost::shared_ptr<sys::ConnectionCodec::Factory> getConnectionFactory() { return factory; }
void setConnectionFactory(boost::shared_ptr<sys::ConnectionCodec::Factory> f) { factory = f; }
- Timer& getTimer() { return timer; }
+ sys::Timer& getTimer() { return timer; }
boost::function<std::vector<Url> ()> getKnownBrokers;
@@ -242,7 +240,5 @@
};
}}
-
-
#endif /*!_Broker_*/
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Thu Jul 30 14:06:49 2009
@@ -49,35 +49,25 @@
namespace qpid {
namespace broker {
-struct ConnectionTimeoutTask : public TimerTask {
- Timer& timer;
+struct ConnectionTimeoutTask : public sys::TimerTask {
+ sys::Timer& timer;
Connection& connection;
- AbsTime expires;
- ConnectionTimeoutTask(uint16_t hb, Timer& t, Connection& c) :
+ ConnectionTimeoutTask(uint16_t hb, sys::Timer& t, Connection& c) :
TimerTask(Duration(hb*2*TIME_SEC)),
timer(t),
- connection(c),
- expires(AbsTime::now(), duration)
+ connection(c)
{}
- void touch()
- {
- expires = AbsTime(AbsTime::now(), duration);
+ void touch() {
+ restart();
}
void fire() {
- // This is the best we can currently do to avoid a destruction/fire race
- if (isCancelled()) return;
- if (expires < AbsTime::now()) {
- // If we get here then we've not received any traffic in the timeout period
- // Schedule closing the connection for the io thread
- QPID_LOG(error, "Connection timed out: closing");
- connection.abort();
- } else {
- reset();
- timer.add(this);
- }
+ // If we get here then we've not received any traffic in the timeout period
+ // Schedule closing the connection for the io thread
+ QPID_LOG(error, "Connection timed out: closing");
+ connection.abort();
}
};
@@ -338,25 +328,22 @@
adapter.setSecureConnection(s);
}
-struct ConnectionHeartbeatTask : public TimerTask {
- Timer& timer;
+struct ConnectionHeartbeatTask : public sys::TimerTask {
+ sys::Timer& timer;
Connection& connection;
- ConnectionHeartbeatTask(uint16_t hb, Timer& t, Connection& c) :
+ ConnectionHeartbeatTask(uint16_t hb, sys::Timer& t, Connection& c) :
TimerTask(Duration(hb*TIME_SEC)),
timer(t),
connection(c)
{}
void fire() {
- // This is the best we can currently do to avoid a destruction/fire race
- if (!isCancelled()) {
- // Setup next firing
- reset();
- timer.add(this);
+ // Setup next firing
+ setupNextFire();
+ timer.add(this);
- // Send Heartbeat
- connection.sendHeartbeat();
- }
+ // Send Heartbeat
+ connection.sendHeartbeat();
}
};
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h Thu Jul 30 14:06:49 2009
@@ -152,8 +152,8 @@
qmf::org::apache::qpid::broker::Connection* mgmtObject;
LinkRegistry& links;
management::ManagementAgent* agent;
- Timer& timer;
- boost::intrusive_ptr<TimerTask> heartbeatTimer;
+ sys::Timer& timer;
+ boost::intrusive_ptr<sys::TimerTask> heartbeatTimer;
boost::intrusive_ptr<ConnectionTimeoutTask> timeoutTimer;
ErrorListener* errorListener;
bool shadow;
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.cpp Thu Jul 30 14:06:49 2009
@@ -33,7 +33,7 @@
using namespace qpid::broker;
using namespace qpid::framing;
-DtxManager::DtxManager(Timer& t) : store(0), timer(t) {}
+DtxManager::DtxManager(sys::Timer& t) : store(0), timer(t) {}
DtxManager::~DtxManager() {}
@@ -130,8 +130,7 @@
}
timeout = intrusive_ptr<DtxTimeout>(new DtxTimeout(secs, *this, xid));
record->setTimeout(timeout);
- timer.add(boost::static_pointer_cast<TimerTask>(timeout));
-
+ timer.add(timeout);
}
uint32_t DtxManager::getTimeout(const std::string& xid)
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/DtxManager.h Thu Jul 30 14:06:49 2009
@@ -24,9 +24,9 @@
#include <boost/ptr_container/ptr_map.hpp>
#include "qpid/broker/DtxBuffer.h"
#include "qpid/broker/DtxWorkRecord.h"
-#include "qpid/broker/Timer.h"
#include "qpid/broker/TransactionalStore.h"
#include "qpid/framing/amqp_types.h"
+#include "qpid/sys/Timer.h"
#include "qpid/sys/Mutex.h"
namespace qpid {
@@ -35,7 +35,7 @@
class DtxManager{
typedef boost::ptr_map<std::string, DtxWorkRecord> WorkMap;
- struct DtxCleanup : public TimerTask
+ struct DtxCleanup : public sys::TimerTask
{
DtxManager& mgr;
const std::string& xid;
@@ -47,14 +47,14 @@
WorkMap work;
TransactionalStore* store;
qpid::sys::Mutex lock;
- Timer& timer;
+ qpid::sys::Timer& timer;
void remove(const std::string& xid);
DtxWorkRecord* getWork(const std::string& xid);
DtxWorkRecord* createWork(std::string xid);
public:
- DtxManager(Timer&);
+ DtxManager(qpid::sys::Timer&);
~DtxManager();
void start(const std::string& xid, DtxBuffer::shared_ptr work);
void join(const std::string& xid, DtxBuffer::shared_ptr work);
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DtxTimeout.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/DtxTimeout.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/DtxTimeout.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/DtxTimeout.h Thu Jul 30 14:06:49 2009
@@ -22,7 +22,7 @@
#define _DtxTimeout_
#include "qpid/Exception.h"
-#include "qpid/broker/Timer.h"
+#include "qpid/sys/Timer.h"
namespace qpid {
namespace broker {
@@ -31,12 +31,12 @@
struct DtxTimeoutException : public Exception {};
-struct DtxTimeout : public TimerTask
+struct DtxTimeout : public sys::TimerTask
{
const uint32_t timeout;
DtxManager& mgr;
const std::string xid;
-
+
DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid);
void fire();
};
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp Thu Jul 30 14:06:49 2009
@@ -52,7 +52,7 @@
parent(0), store(0), passive(false), passiveChanged(false),
realm(broker->getOptions().realm)
{
- timer.add (intrusive_ptr<TimerTask> (new Periodic(*this)));
+ timer.add (new Periodic(*this));
}
LinkRegistry::Periodic::Periodic (LinkRegistry& _links) :
@@ -61,7 +61,7 @@
void LinkRegistry::Periodic::fire ()
{
links.periodicMaintenance ();
- links.timer.add (intrusive_ptr<TimerTask> (new Periodic(links)));
+ links.timer.add (new Periodic(links));
}
void LinkRegistry::periodicMaintenance ()
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h Thu Jul 30 14:06:49 2009
@@ -25,9 +25,9 @@
#include <map>
#include "qpid/broker/Bridge.h"
#include "qpid/broker/MessageStore.h"
-#include "qpid/broker/Timer.h"
#include "qpid/Address.h"
#include "qpid/sys/Mutex.h"
+#include "qpid/sys/Timer.h"
#include "qpid/management/Manageable.h"
#include <boost/shared_ptr.hpp>
@@ -41,7 +41,7 @@
// Declare a timer task to manage the establishment of link connections and the
// re-establishment of lost link connections.
- struct Periodic : public TimerTask
+ struct Periodic : public sys::TimerTask
{
LinkRegistry& links;
@@ -62,7 +62,7 @@
qpid::sys::Mutex lock;
Broker* broker;
- Timer timer;
+ sys::Timer timer;
management::Manageable* parent;
MessageStore* store;
bool passive;
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.cpp Thu Jul 30 14:06:49 2009
@@ -26,15 +26,15 @@
namespace qpid {
namespace broker {
-QueueCleaner::QueueCleaner(QueueRegistry& q, Timer& t) : queues(q), timer(t) {}
+QueueCleaner::QueueCleaner(QueueRegistry& q, sys::Timer& t) : queues(q), timer(t) {}
void QueueCleaner::start(qpid::sys::Duration p)
{
- task = boost::intrusive_ptr<TimerTask>(new Task(*this, p));
+ task = new Task(*this, p);
timer.add(task);
}
-QueueCleaner::Task::Task(QueueCleaner& p, qpid::sys::Duration d) : TimerTask(d), parent(p) {}
+QueueCleaner::Task::Task(QueueCleaner& p, qpid::sys::Duration d) : sys::TimerTask(d), parent(p) {}
void QueueCleaner::Task::fire()
{
@@ -44,7 +44,7 @@
void QueueCleaner::fired()
{
queues.eachQueue(boost::bind(&Queue::purgeExpired, _1));
- task->reset();
+ task->setupNextFire();
timer.add(task);
}
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/QueueCleaner.h Thu Jul 30 14:06:49 2009
@@ -23,7 +23,7 @@
*/
#include "qpid/broker/BrokerImportExport.h"
-#include "qpid/broker/Timer.h"
+#include "qpid/sys/Timer.h"
namespace qpid {
namespace broker {
@@ -35,10 +35,10 @@
class QueueCleaner
{
public:
- QPID_BROKER_EXTERN QueueCleaner(QueueRegistry& queues, Timer& timer);
+ QPID_BROKER_EXTERN QueueCleaner(QueueRegistry& queues, sys::Timer& timer);
QPID_BROKER_EXTERN void start(qpid::sys::Duration period);
private:
- class Task : public TimerTask
+ class Task : public sys::TimerTask
{
public:
Task(QueueCleaner& parent, qpid::sys::Duration duration);
@@ -46,10 +46,10 @@
private:
QueueCleaner& parent;
};
-
- boost::intrusive_ptr<TimerTask> task;
+
+ boost::intrusive_ptr<sys::TimerTask> task;
QueueRegistry& queues;
- Timer& timer;
+ sys::Timer& timer;
void fired();
};
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Thu Jul 30 14:06:49 2009
@@ -25,7 +25,7 @@
#include "qpid/broker/SessionManager.h"
#include "qpid/broker/SessionHandler.h"
#include "qpid/broker/RateFlowcontrol.h"
-#include "qpid/broker/Timer.h"
+#include "qpid/sys/Timer.h"
#include "qpid/framing/AMQContentBody.h"
#include "qpid/framing/AMQHeaderBody.h"
#include "qpid/framing/AMQMethodBody.h"
@@ -49,6 +49,7 @@
using qpid::management::Manageable;
using qpid::management::Args;
using qpid::sys::AbsTime;
+//using qpid::sys::Timer;
namespace _qmf = qmf::org::apache::qpid::broker;
SessionState::SessionState(
@@ -206,10 +207,10 @@
}
}
-struct ScheduledCreditTask : public TimerTask {
- Timer& timer;
+struct ScheduledCreditTask : public sys::TimerTask {
+ sys::Timer& timer;
SessionState& sessionState;
- ScheduledCreditTask(const qpid::sys::Duration& d, Timer& t,
+ ScheduledCreditTask(const qpid::sys::Duration& d, sys::Timer& t,
SessionState& s) :
TimerTask(d),
timer(t),
@@ -218,15 +219,13 @@
void fire() {
// This is the best we can currently do to avoid a destruction/fire race
- if (!isCancelled()) {
- sessionState.getConnection().requestIOProcessing(boost::bind(&ScheduledCreditTask::sendCredit, this));
- }
+ sessionState.getConnection().requestIOProcessing(boost::bind(&ScheduledCreditTask::sendCredit, this));
}
void sendCredit() {
if ( !sessionState.processSendCredit(0) ) {
QPID_LOG(warning, sessionState.getId() << ": Reschedule sending credit");
- reset();
+ setupNextFire();
timer.add(this);
}
}
@@ -269,7 +268,7 @@
if (rateFlowcontrol && frame.getBof() && frame.getBos()) {
if ( !processSendCredit(1) ) {
QPID_LOG(debug, getId() << ": Schedule sending credit");
- Timer& timer = getBroker().getTimer();
+ sys::Timer& timer = getBroker().getTimer();
// Use heuristic for scheduled credit of time for 50 messages, but not longer than 500ms
sys::Duration d = std::min(sys::TIME_SEC * 50 / rateFlowcontrol->getRate(), 500 * sys::TIME_MSEC);
flowControlTimer = new ScheduledCreditTask(d, timer, *this);
Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.h Thu Jul 30 14:06:49 2009
@@ -48,6 +48,10 @@
class AMQP_ClientProxy;
}
+namespace sys {
+struct TimerTask;
+}
+
namespace broker {
class Broker;
@@ -56,7 +60,6 @@
class SessionHandler;
class SessionManager;
class RateFlowcontrol;
-struct TimerTask;
/**
* Broker-side session state includes session's handler chains, which
@@ -153,7 +156,7 @@
// State used for producer flow control (rate limited)
qpid::sys::Mutex rateLock;
boost::scoped_ptr<RateFlowcontrol> rateFlowcontrol;
- boost::intrusive_ptr<TimerTask> flowControlTimer;
+ boost::intrusive_ptr<sys::TimerTask> flowControlTimer;
friend class SessionManager;
};
Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.cpp Thu Jul 30 14:06:49 2009
@@ -19,21 +19,21 @@
*
*/
+#include "qpid/broker/Message.h"
#include "qpid/cluster/ExpiryPolicy.h"
#include "qpid/cluster/Multicaster.h"
#include "qpid/framing/ClusterMessageExpiredBody.h"
#include "qpid/sys/Time.h"
-#include "qpid/broker/Message.h"
-#include "qpid/broker/Timer.h"
+#include "qpid/sys/Timer.h"
#include "qpid/log/Statement.h"
namespace qpid {
namespace cluster {
-ExpiryPolicy::ExpiryPolicy(Multicaster& m, const MemberId& id, broker::Timer& t)
+ExpiryPolicy::ExpiryPolicy(Multicaster& m, const MemberId& id, sys::Timer& t)
: expiryId(0), expiredPolicy(new Expired), mcast(m), memberId(id), timer(t) {}
-struct ExpiryTask : public broker::TimerTask {
+struct ExpiryTask : public sys::TimerTask {
ExpiryTask(const boost::intrusive_ptr<ExpiryPolicy>& policy, uint64_t id, sys::AbsTime when)
: TimerTask(when), expiryPolicy(policy), expiryId(id) {}
void fire() { expiryPolicy->sendExpire(expiryId); }
Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/ExpiryPolicy.h Thu Jul 30 14:06:49 2009
@@ -33,10 +33,13 @@
namespace qpid {
namespace broker {
-class Timer;
class Message;
}
+namespace sys {
+class Timer;
+}
+
namespace cluster {
class Multicaster;
@@ -46,7 +49,7 @@
class ExpiryPolicy : public broker::ExpiryPolicy
{
public:
- ExpiryPolicy(Multicaster&, const MemberId&, broker::Timer&);
+ ExpiryPolicy(Multicaster&, const MemberId&, sys::Timer&);
void willExpire(broker::Message&);
bool hasExpired(broker::Message&);
@@ -78,7 +81,7 @@
boost::intrusive_ptr<Expired> expiredPolicy;
Multicaster& mcast;
MemberId memberId;
- broker::Timer& timer;
+ sys::Timer& timer;
};
}} // namespace qpid::cluster
Modified: qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp Thu Jul 30 14:06:49 2009
@@ -92,7 +92,7 @@
broker = _broker;
threadPoolSize = _threads;
ManagementObject::maxThreads = threadPoolSize;
- timer.add (intrusive_ptr<TimerTask> (new Periodic(*this, interval)));
+ timer.add (new Periodic(*this, interval));
// Get from file or generate and save to file.
if (dataDir.empty())
Modified: qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h?rev=799273&r1=799272&r2=799273&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/management/ManagementAgent.h Thu Jul 30 14:06:49 2009
@@ -24,9 +24,9 @@
#include "qpid/broker/BrokerImportExport.h"
#include "qpid/Options.h"
#include "qpid/broker/Exchange.h"
-#include "qpid/broker/Timer.h"
#include "qpid/framing/Uuid.h"
#include "qpid/sys/Mutex.h"
+#include "qpid/sys/Timer.h"
#include "qpid/broker/ConnectionToken.h"
#include "qpid/management/ManagementObject.h"
#include "qpid/management/ManagementEvent.h"
@@ -98,7 +98,7 @@
void disallow(const std::string& className, const std::string& methodName, const std::string& message);
private:
- struct Periodic : public qpid::broker::TimerTask
+ struct Periodic : public qpid::sys::TimerTask
{
ManagementAgent& agent;
@@ -183,7 +183,7 @@
framing::Uuid uuid;
sys::Mutex addLock;
sys::Mutex userLock;
- qpid::broker::Timer timer;
+ qpid::sys::Timer timer;
qpid::broker::Exchange::shared_ptr mExchange;
qpid::broker::Exchange::shared_ptr dExchange;
std::string dataDir;
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org