From 72650d4cc41c64136d064967d7fec3726d850fee Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 14 Oct 2010 11:52:28 +0000
Subject: [PATCH] Multiple enhancements and bug fixes to the SDK (update from OpenDS by matthew_swift):
---
sdk/src/org/opends/sdk/ConnectionPool.java | 47 ++++++++++++++++++++++++++++++++---------------
1 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/sdk/src/org/opends/sdk/ConnectionPool.java b/sdk/src/org/opends/sdk/ConnectionPool.java
index 1789d1d..a7b5f75 100644
--- a/sdk/src/org/opends/sdk/ConnectionPool.java
+++ b/sdk/src/org/opends/sdk/ConnectionPool.java
@@ -38,7 +38,7 @@
import org.opends.sdk.responses.*;
import org.opends.sdk.schema.Schema;
-import com.sun.opends.sdk.util.AbstractFutureResult;
+import com.sun.opends.sdk.util.AsynchronousFutureResult;
import com.sun.opends.sdk.util.CompletedFutureResult;
import com.sun.opends.sdk.util.StaticUtils;
@@ -51,24 +51,13 @@
{
// Future used for waiting for pooled connections to become available.
private static final class FuturePooledConnection extends
- AbstractFutureResult<AsynchronousConnection>
+ AsynchronousFutureResult<AsynchronousConnection>
{
private FuturePooledConnection(
final ResultHandler<? super AsynchronousConnection> handler)
{
super(handler);
}
-
-
-
- /**
- * {@inheritDoc}
- */
- public int getRequestID()
- {
- return -1;
- }
-
}
@@ -289,8 +278,7 @@
- public void handleUnsolicitedNotification(
- final ExtendedResult notification)
+ public void handleUnsolicitedNotification(final ExtendedResult notification)
{
// Ignore
}
@@ -567,6 +555,20 @@
}
return connection.searchSingleEntry(request, resultHandler);
}
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("PooledConnection(");
+ builder.append(connection);
+ builder.append(')');
+ return builder.toString();
+ }
}
@@ -738,7 +740,22 @@
handler.handleResult(pooledConnection);
}
return new CompletedFutureResult<AsynchronousConnection>(pooledConnection);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public String toString()
+ {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("ConnectionPool(");
+ builder.append(String.valueOf(connectionFactory));
+ builder.append(',');
+ builder.append(poolSize);
+ builder.append(')');
+ return builder.toString();
}
--
Gitblit v1.10.0