summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/Allocatable.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/Allocatable.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/Allocatable.cpp')
-rw-r--r--cpp/src/IceGrid/Allocatable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/Allocatable.cpp b/cpp/src/IceGrid/Allocatable.cpp
index 5d05acda6b8..bcf1e5b17ef 100644
--- a/cpp/src/IceGrid/Allocatable.cpp
+++ b/cpp/src/IceGrid/Allocatable.cpp
@@ -38,7 +38,7 @@ AllocationRequest::pending()
if(_timeout > 0)
{
- _session->getWaitQueue()->add(this, IceUtil::Time::milliSeconds(_timeout));
+ _session->getTimer()->schedule(this, IceUtil::Time::now() + IceUtil::Time::milliSeconds(_timeout));
}
_state = Pending;
return true;
@@ -57,7 +57,7 @@ AllocationRequest::allocate(const AllocatablePtr& allocatable, const SessionIPtr
case Pending:
if(_timeout > 0)
{
- _session->getWaitQueue()->remove(this);
+ _session->getTimer()->cancel(this);
}
_session->removeAllocationRequest(this);
break;
@@ -96,7 +96,7 @@ AllocationRequest::cancel(const AllocationException& ex)
case Pending:
if(_timeout > 0)
{
- _session->getWaitQueue()->remove(this);
+ _session->getTimer()->cancel(this);
}
_session->removeAllocationRequest(this);
break;
@@ -107,7 +107,7 @@ AllocationRequest::cancel(const AllocationException& ex)
}
void
-AllocationRequest::expired(bool destroyed)
+AllocationRequest::run() // TimerTask::run() method implementation
{
Lock sync(*this);
switch(_state)