You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ak...@apache.org on 2010/06/14 17:56:25 UTC
svn commit: r954527 -
/trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H
Author: akundu
Date: Mon Jun 14 15:56:24 2010
New Revision: 954527
URL: http://svn.apache.org/viewvc?rev=954527&view=rev
Log:
cleanup on the connection pool code
Added:
trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H
Added: trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H?rev=954527&view=auto
==============================================================================
--- trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H (added)
+++ trafficserver/traffic/branches/UserFiber/core/include/UFConnectionPool.H Mon Jun 14 15:56:24 2010
@@ -0,0 +1,44 @@
+#ifndef UFCONNECTIONPOOL_H
+#define UFCONNECTIONPOOL_H
+
+#include <time.h>
+
+#include <string>
+#include <vector>
+#include <map>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include "UF.H"
+
+class UFConnGroupInfo;
+class UFConnIPInfo;
+class UFIO;
+class UFConnectionPoolImpl;
+struct UFConnectionPool
+{
+ UFConnectionPool();
+
+ bool addGroup(UFConnGroupInfo* groupInfo);
+ UFConnGroupInfo* removeGroup(const std::string& groupName);
+ UFIO* getConnection(const std::string& groupName, bool waitForConnection = true);
+ void releaseConnection(UFIO* ufIO, bool connOk = true);
+ void clearUnusedConnections(TIME_IN_US lastUsedTimeDiff = 300000000 /*300 secs*/, unsigned long long int coverListTime = 60*1000*1000);
+
+ ///how long to timeout an ip that we cant connect to (is not responding)
+ void setTimeToTimeoutIPAfterFailure(TIME_IN_US timeout);
+ TIME_IN_US getTimeToTimeoutIPAfterFailure();
+ void setMaxSimulConnsPerHost(int input);
+ int getMaxSimulConnsPerHost();
+ double getGroupAvailability(const std::string& name) const;
+
+ std::string fillInfo(std::string& data, bool detailed = false) const;
+
+protected:
+ UFConnectionPoolImpl* _impl;
+};
+
+
+#endif