diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-06-27 10:31:41 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-06-27 10:31:41 +0200 |
commit | a4f93259dc3494d98addf38e69b87eb557d432b3 (patch) | |
tree | d2b78bb5cea24e33dc1b46be22dba6167e96c9ed /java/test/Ice/retry/RetryI.java | |
parent | Fix for ICE-5515 (ice_staticId on proxies) in Java, C#, Python, Ruby and PHP ... (diff) | |
download | ice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.bz2 ice-a4f93259dc3494d98addf38e69b87eb557d432b3.tar.xz ice-a4f93259dc3494d98addf38e69b87eb557d432b3.zip |
Better collocation optimization, fix for ICE-5489, ICE-5484
Diffstat (limited to 'java/test/Ice/retry/RetryI.java')
-rw-r--r-- | java/test/Ice/retry/RetryI.java | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/java/test/Ice/retry/RetryI.java b/java/test/Ice/retry/RetryI.java index 22a98b566ad..ae336cac007 100644 --- a/java/test/Ice/retry/RetryI.java +++ b/java/test/Ice/retry/RetryI.java @@ -22,13 +22,66 @@ public final class RetryI extends _RetryDisp { if(kill) { - current.con.close(true); + if(current.con != null) + { + current.con.close(true); + } + else + { + throw new Ice.ConnectionLostException(); + } } } + public int + opIdempotent(int counter, Ice.Current current) + { + if(counter + nRetry > _counter) + { + ++_counter; + if(current.con != null) + { + current.con.close(true); + } + else + { + throw new Ice.ConnectionLostException(); + } + } + return _counter; + } + + public void + opNotIdempotent(int counter, Ice.Current current) + { + if(_counter != counter) + { + return; + } + + ++_counter; + if(current.con != null) + { + current.con.close(true); + } + else + { + throw new Ice.ConnectionLostException(); + } + } + + public void + opSystemException(Ice.Current c) + { + throw new SystemFailure(); + } + public void shutdown(Ice.Current current) { current.adapter.getCommunicator().shutdown(); } + + private int _counter; + static final int nRetry = 4; } |