You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ta...@apache.org on 2015/10/06 00:18:00 UTC
[1/2] qpid-jms git commit: NO-JIRA Reduce overhead on create of a
request object in FailoverProvider,
no need to be a ProviderFuture instance since it wraps one already.
Repository: qpid-jms
Updated Branches:
refs/heads/master febb811d9 -> c4eac4941
NO-JIRA Reduce overhead on create of a request object in
FailoverProvider, no need to be a ProviderFuture instance since it wraps
one already.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/005348cd
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/005348cd
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/005348cd
Branch: refs/heads/master
Commit: 005348cdf8ac72b5e07a1c1c176a5a9530e91524
Parents: febb811
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Oct 5 18:06:52 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Oct 5 18:06:52 2015 -0400
----------------------------------------------------------------------
.../org/apache/qpid/jms/provider/failover/FailoverProvider.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/005348cd/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
index 2970533..d7fc1d3 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/failover/FailoverProvider.java
@@ -50,6 +50,7 @@ import org.apache.qpid.jms.provider.ProviderFactory;
import org.apache.qpid.jms.provider.ProviderFuture;
import org.apache.qpid.jms.provider.ProviderListener;
import org.apache.qpid.jms.provider.ProviderRedirectedException;
+import org.apache.qpid.jms.provider.WrappedAsyncResult;
import org.apache.qpid.jms.util.IOExceptionSupport;
import org.apache.qpid.jms.util.ThreadPoolUtils;
import org.slf4j.Logger;
@@ -929,7 +930,7 @@ public class FailoverProvider extends DefaultProviderListener implements Provide
* Provider instance an instance of FailoverRequest is used to handle errors that
* occur during processing of that request and trigger a reconnect.
*/
- protected abstract class FailoverRequest extends ProviderFuture implements Runnable {
+ protected abstract class FailoverRequest extends WrappedAsyncResult implements Runnable {
private final long id = requestId.incrementAndGet();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-jms git commit: NO-JIRA simplify the ProviderFuture class,
no need to extend WrappedAsyncResult any longer.
Posted by ta...@apache.org.
NO-JIRA simplify the ProviderFuture class, no need to extend
WrappedAsyncResult any longer.
Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/c4eac494
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/c4eac494
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/c4eac494
Branch: refs/heads/master
Commit: c4eac49418a771ba3d79da1c99b0dfc988934dc5
Parents: 005348c
Author: Timothy Bish <ta...@gmail.com>
Authored: Mon Oct 5 18:12:26 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Mon Oct 5 18:12:26 2015 -0400
----------------------------------------------------------------------
.../org/apache/qpid/jms/provider/ProviderFuture.java | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c4eac494/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java
index 6461469..f6e75bb 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/ProviderFuture.java
@@ -26,20 +26,12 @@ import org.apache.qpid.jms.util.IOExceptionSupport;
/**
* Asynchronous Provider Future class.
*/
-public class ProviderFuture extends WrappedAsyncResult {
+public class ProviderFuture implements AsyncResult {
private final AtomicBoolean completer = new AtomicBoolean();
private final CountDownLatch latch = new CountDownLatch(1);
private volatile Throwable error;
- public ProviderFuture() {
- super(null);
- }
-
- public ProviderFuture(AsyncResult watcher) {
- super(watcher);
- }
-
@Override
public boolean isComplete() {
return latch.getCount() == 0;
@@ -50,7 +42,6 @@ public class ProviderFuture extends WrappedAsyncResult {
if(completer.compareAndSet(false, true)) {
error = result;
latch.countDown();
- super.onFailure(result);
}
}
@@ -58,7 +49,6 @@ public class ProviderFuture extends WrappedAsyncResult {
public void onSuccess() {
if(completer.compareAndSet(false, true)) {
latch.countDown();
- super.onSuccess();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org