summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/IceGridNode.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-08-30 16:15:46 +0200
committerBenoit Foucher <benoit@zeroc.com>2007-08-30 16:15:46 +0200
commit90679336bd9c0abddfdcfc037b58a3fbe8299fbf (patch)
tree578692481f64bf0f1b1d76351b395dfbcf52a708 /cpp/src/IceGrid/IceGridNode.cpp
parentbug 2424: check for null in Java hashCode method (diff)
downloadice-90679336bd9c0abddfdcfc037b58a3fbe8299fbf.tar.bz2
ice-90679336bd9c0abddfdcfc037b58a3fbe8299fbf.tar.xz
ice-90679336bd9c0abddfdcfc037b58a3fbe8299fbf.zip
Squashed commit of the following:
commit a61fce80c95ed97d9716648c2083c8581326e950 Author: Benoit Foucher <benoit@zeroc.com> Date: Thu Aug 30 15:33:54 2007 +0200 Added optimization to not wakeup too often commit d44134e724e43aeb1db8693a37a5b611f295948c Author: Benoit Foucher <benoit@zeroc.com> Date: Thu Aug 30 11:34:22 2007 +0200 Changed the connection monitor to use the timer. commit 915f0669599a457f46974c3a108205d5c3c666ba Author: Benoit Foucher <benoit@zeroc.com> Date: Wed Aug 29 16:18:59 2007 +0200 Fixed IceGrid and casino demo to use IceUtil::Timer
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index f887a90dbb8..4a2a6855847 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -8,11 +8,11 @@
// **********************************************************************
#include <IceUtil/UUID.h>
+#include <IceUtil/Timer.h>
#include <Ice/Ice.h>
#include <Ice/Locator.h>
#include <Ice/Service.h>
#include <IceGrid/Activator.h>
-#include <IceGrid/WaitQueue.h>
#include <IceGrid/RegistryI.h>
#include <IceGrid/FileUserAccountMapperI.h>
#include <IceGrid/NodeI.h>
@@ -84,7 +84,7 @@ private:
string trim(const string&);
ActivatorPtr _activator;
- WaitQueuePtr _waitQueue;
+ IceUtil::TimerPtr _timer;
RegistryIPtr _registry;
NodeIPtr _node;
NodeSessionManager _sessions;
@@ -429,10 +429,9 @@ NodeService::start(int argc, char* argv[])
}
//
- // Create the wait queue.
+ // Create a new timer to handle server activation/deactivation timeouts.
//
- _waitQueue = new WaitQueue();
- _waitQueue->start();
+ _timer = new IceUtil::Timer();
//
// The IceGrid instance name.
@@ -446,7 +445,7 @@ NodeService::start(int argc, char* argv[])
//
Identity id = communicator()->stringToIdentity(instanceName + "/Node-" + name);
NodePrx nodeProxy = NodePrx::uncheckedCast(_adapter->createProxy(id));
- _node = new NodeI(_adapter, _sessions, _activator, _waitQueue, traceLevels, nodeProxy, name, mapper);
+ _node = new NodeI(_adapter, _sessions, _activator, _timer, traceLevels, nodeProxy, name, mapper);
_adapter->add(_node, nodeProxy->ice_getIdentity());
//
@@ -657,13 +656,12 @@ NodeService::stop()
}
//
- // The wait queue must be destroyed after the activator and before
- // the communicator is shutdown.
+ // The timer must be destroyed after the activator and before the
+ // communicator is shutdown.
//
try
{
- _waitQueue->destroy();
- _waitQueue = 0;
+ _timer->destroy();
}
catch(...)
{