From 9fdb95ca9c3c8e3524845760b81a85c7a4c81a45 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 04 Dec 2009 11:49:33 +0000
Subject: [PATCH] Drop util package: move ByteString hierarchy into top level sdk package and other "internal" classes to com.sun.*. Move messages into their own package. Clean up imports.
---
sdk/src/org/opends/sdk/ldap/ConnectionPool.java | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/sdk/src/org/opends/sdk/ldap/ConnectionPool.java b/sdk/src/org/opends/sdk/ldap/ConnectionPool.java
index f97356e..cfadeeb 100644
--- a/sdk/src/org/opends/sdk/ldap/ConnectionPool.java
+++ b/sdk/src/org/opends/sdk/ldap/ConnectionPool.java
@@ -27,18 +27,21 @@
package org.opends.sdk.ldap;
+import java.util.Stack;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.logging.Level;
+
import org.opends.sdk.*;
-import org.opends.sdk.util.StaticUtils;
-import org.opends.sdk.responses.Result;
+import org.opends.sdk.requests.*;
import org.opends.sdk.responses.BindResult;
import org.opends.sdk.responses.CompareResult;
import org.opends.sdk.responses.GenericExtendedResult;
-import org.opends.sdk.requests.*;
+import org.opends.sdk.responses.Result;
-import java.util.concurrent.*;
-import java.util.Queue;
-import java.util.Stack;
-import java.util.logging.Level;
+import com.sun.opends.sdk.util.StaticUtils;
/**
* Created by IntelliJ IDEA. User: digitalperk Date: Nov 25, 2009 Time: 11:12:29
@@ -50,7 +53,7 @@
private volatile int numConnections;
private final int poolSize;
private final Stack<AsynchronousConnection> pool;
- private final ConcurrentLinkedQueue<PendingConnectionFuture> pendingFutures;
+ private final ConcurrentLinkedQueue<PendingConnectionFuture<?>> pendingFutures;
private final Object lock = new Object();
private class PooledConnectionWapper
@@ -108,7 +111,7 @@
}
// See if there waiters pending
- PendingConnectionFuture future = pendingFutures.poll();
+ PendingConnectionFuture<?> future = pendingFutures.poll();
if (future != null) {
PooledConnectionWapper pooledConnection =
new PooledConnectionWapper(connection);
@@ -356,14 +359,14 @@
this.connectionFactory = connectionFactory;
this.poolSize = poolSize;
this.pool = new Stack<AsynchronousConnection>();
- this.pendingFutures = new ConcurrentLinkedQueue<PendingConnectionFuture>();
+ this.pendingFutures = new ConcurrentLinkedQueue<PendingConnectionFuture<?>>();
}
private class WrapConnectionResultHandler
implements ConnectionResultHandler<AsynchronousConnection, Void> {
- private final PendingConnectionFuture future;
+ private final PendingConnectionFuture<?> future;
- private WrapConnectionResultHandler(PendingConnectionFuture future) {
+ private WrapConnectionResultHandler(PendingConnectionFuture<?> future) {
this.future = future;
}
--
Gitblit v1.10.0