Permalink
Browse files

Configurable isAlive and connect timeout

  • Loading branch information...
1 parent e9b57bf commit 0943254115a95ec590960bec57a3230c50e4a871 Clément Stenac committed Mar 2, 2010
Showing with 16 additions and 0 deletions.
  1. +16 −0 src/com/exalead/io/failover/FailoverHttpClient.java
@@ -49,6 +49,22 @@ public void setIsAlivePath(String isAlivePath) {
manager.isAlivePath = isAlivePath;
}
+ /**
+ * Set the timeout for establishing connection
+ * @param timeout timeout in milliseconds
+ */
+ public void setConnectTimeout(int timeout) {
+ manager.connectionTimeout = timeout;
+ }
+
+ /**
+ * Set the timeout for the isAlive service to answer
+ * @param timeout timeout in milliseconds
+ */
+ public void setIsAliveTimeout(int timeout) {
+ manager.isAliveTimeout = timeout;
+ }
+
// /** Maximum time to wait for a connection to become available
// * (if all hosts are not down and max number of connections
// * is exceeded)

0 comments on commit 0943254

Please sign in to comment.