diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-08-08 16:48:43 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-08-08 16:48:43 -0230 |
commit | 98a1b3ffe79fda923712c684ba08f67c2d9aed5e (patch) | |
tree | b5be1ffb57fe5923943779f396c69da7ee59434c /java/src/IceInternal/FactoryACMMonitor.java | |
parent | Fixed lots of warnings. (diff) | |
download | ice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.tar.bz2 ice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.tar.xz ice-98a1b3ffe79fda923712c684ba08f67c2d9aed5e.zip |
ICE-5630 - ACM timeout is broken
- Also refactored the code a bit in java so that the ACMMonitor doesn't
inherit from runnable.
Diffstat (limited to 'java/src/IceInternal/FactoryACMMonitor.java')
-rw-r--r-- | java/src/IceInternal/FactoryACMMonitor.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/java/src/IceInternal/FactoryACMMonitor.java b/java/src/IceInternal/FactoryACMMonitor.java index 420513ff9dd..0f9b6d18f00 100644 --- a/java/src/IceInternal/FactoryACMMonitor.java +++ b/java/src/IceInternal/FactoryACMMonitor.java @@ -77,8 +77,14 @@ class FactoryACMMonitor implements ACMMonitor { _connections.add(connection); assert _future == null; - _future = _instance.timer().scheduleAtFixedRate(this, _config.timeout / 2, _config.timeout / 2, - java.util.concurrent.TimeUnit.MILLISECONDS); + _future = _instance.timer().scheduleAtFixedRate(new Runnable() { + @Override + public void run() + { + monitorConnections(); + } + }, + _config.timeout / 2, _config.timeout / 2, java.util.concurrent.TimeUnit.MILLISECONDS); } else { @@ -155,9 +161,8 @@ class FactoryACMMonitor implements ACMMonitor return connections; } - @Override - public void - run() + private void + monitorConnections() { synchronized(this) { |