diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-24 16:04:21 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-09-24 16:04:21 +0000 |
commit | 6604a2b1fa4ea2f506b5a997b73efe3ef1cae9d9 (patch) | |
tree | 1308a4235ec962647760ff4ed3de55f26259c33e /BKUOnline/src | |
parent | 81eb1e485a03a6bd1efb726892631ab037d59fdb (diff) | |
download | mocca-6604a2b1fa4ea2f506b5a997b73efe3ef1cae9d9.tar.gz mocca-6604a2b1fa4ea2f506b5a997b73efe3ef1cae9d9.tar.bz2 mocca-6604a2b1fa4ea2f506b5a997b73efe3ef1cae9d9.zip |
remove isHandlingRequest
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@68 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src')
-rw-r--r-- | BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java index 6160c71e..7897f984 100644 --- a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java +++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java @@ -50,10 +50,10 @@ public class STALRequestBrokerImpl implements STALRequestBroker { protected List<STALRequest> requests = null; protected List<STALResponse> responses = null; protected List<HashDataInput> currentHashDataInput; - private boolean isHandlingRequest = false; +// private boolean isHandlingRequest = false; private boolean expectingResponse = false; private boolean interrupted = false; - + /** * Produce requests (and HashDataInputCallback) and wait for responses. * The next thread may enter once we consumed the responses. @@ -69,17 +69,17 @@ public class STALRequestBrokerImpl implements STALRequestBroker { return null; } try { - long beforeWait = System.currentTimeMillis(); - while (isHandlingRequest) { - log.trace("waiting to produce request"); - wait(TIMEOUT_MS); - if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { - log.warn("timeout while waiting to produce request"); - return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); - } - } +// long beforeWait = System.currentTimeMillis(); +// while (isHandlingRequest) { +// log.trace("waiting to produce request"); +// wait(TIMEOUT_MS); +// if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) { +// log.warn("timeout while waiting to produce request"); +// return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); +// } +// } log.trace("produce request"); - isHandlingRequest = true; +// isHandlingRequest = true; this.requests = requests; currentHashDataInput = null; @@ -100,7 +100,7 @@ public class STALRequestBrokerImpl implements STALRequestBroker { log.trace("notifying request consumers"); notify(); - beforeWait = System.currentTimeMillis(); + long beforeWait = System.currentTimeMillis(); while (this.responses == null) { log.trace("waiting to consume response"); wait(TIMEOUT_MS); @@ -108,7 +108,7 @@ public class STALRequestBrokerImpl implements STALRequestBroker { log.warn("timeout while waiting to consume response"); this.requests = null; currentHashDataInput = null; - isHandlingRequest = false; +// isHandlingRequest = false; return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000)); } } @@ -118,9 +118,9 @@ public class STALRequestBrokerImpl implements STALRequestBroker { log.trace("notifying response producers"); notify(); - isHandlingRequest = false; - log.trace("notifying request producers"); - notify(); +// isHandlingRequest = false; +// log.trace("notifying request producers"); +// notify(); return resps; } catch (InterruptedException ex) { @@ -186,9 +186,9 @@ public class STALRequestBrokerImpl implements STALRequestBroker { List<STALRequest> reqs = requests; requests = null; if (reqs.size() > 0 && reqs.get(0) instanceof QuitRequest) { - isHandlingRequest = false; - log.trace("consumed QUIT, notifying request producers"); - notify(); +// isHandlingRequest = false; +// log.trace("consumed QUIT, notifying request producers"); +// notify(); log.trace("expecting no response in next nextRequest()"); expectingResponse = false; } |