From 23b59def043a8f71238ec5d73a393b32fb40f83c Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 14 Oct 2010 16:15:50 +0000
Subject: [PATCH] Commit from OpenDS, matthew_swift * add unit tests for ConnectionEventListeners.
---
sdk/src/org/opends/sdk/RoundRobinLoadBalancingAlgorithm.java | 52 ++++++++++++++++++++++++++--------------------------
1 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/sdk/src/org/opends/sdk/RoundRobinLoadBalancingAlgorithm.java b/sdk/src/org/opends/sdk/RoundRobinLoadBalancingAlgorithm.java
index cf4ab46..2968565 100644
--- a/sdk/src/org/opends/sdk/RoundRobinLoadBalancingAlgorithm.java
+++ b/sdk/src/org/opends/sdk/RoundRobinLoadBalancingAlgorithm.java
@@ -68,11 +68,11 @@
/**
- * Creates a new round robin load balancing algorithm which will use a default
- * scheduler for monitoring offline connection factories every 10 seconds.
+ * Creates a new round robin load balancing algorithm which will monitor
+ * offline connection factories every 10 seconds using the default scheduler.
*
* @param factories
- * The unordered collection of connection factories.
+ * The ordered collection of connection factories.
*/
public RoundRobinLoadBalancingAlgorithm(
final Collection<ConnectionFactory> factories)
@@ -84,48 +84,48 @@
/**
- * Creates a new round robin load balancing algorithm which will use the
- * provided scheduler for monitoring offline connection factories every 10
- * seconds.
+ * Creates a new round robin load balancing algorithm which will monitor
+ * offline connection factories using the specified frequency using the
+ * default scheduler.
*
* @param factories
- * The unordered collection of connection factories.
- * @param scheduler
- * The scheduler which should for periodically monitoring offline
- * connection factories to see if they are usable again.
+ * The connection factories.
+ * @param interval
+ * The interval between attempts to poll offline factories.
+ * @param unit
+ * The time unit for the interval between attempts to poll offline
+ * factories.
*/
public RoundRobinLoadBalancingAlgorithm(
- final Collection<ConnectionFactory> factories,
- final ScheduledExecutorService scheduler)
+ final Collection<ConnectionFactory> factories, final long interval,
+ final TimeUnit unit)
{
- super(factories, scheduler);
+ super(factories, interval, unit);
this.maxIndex = factories.size();
}
/**
- * Creates a new round robin load balancing algorithm which will use the
- * provided scheduler for monitoring offline connection factories.
+ * Creates a new round robin load balancing algorithm which will monitor
+ * offline connection factories using the specified frequency and scheduler.
*
* @param factories
- * The unordered collection of connection factories.
- * @param scheduler
- * The scheduler which should for periodically monitoring offline
- * connection factories to see if they are usable again.
+ * The connection factories.
* @param interval
- * The interval between attempts to poll offline connection
- * factories.
+ * The interval between attempts to poll offline factories.
* @param unit
* The time unit for the interval between attempts to poll offline
- * connection factories.
+ * factories.
+ * @param scheduler
+ * The scheduler which should for periodically monitoring dead
+ * connection factories to see if they are usable again.
*/
public RoundRobinLoadBalancingAlgorithm(
- final Collection<ConnectionFactory> factories,
- final ScheduledExecutorService scheduler, final long interval,
- final TimeUnit unit)
+ final Collection<ConnectionFactory> factories, final long interval,
+ final TimeUnit unit, final ScheduledExecutorService scheduler)
{
- super(factories, scheduler, interval, unit);
+ super(factories, interval, unit, scheduler);
this.maxIndex = factories.size();
}
--
Gitblit v1.10.0