CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sharding_policy.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_NETWORK_SHARDING_POLICY_H_
6 #define CVMFS_NETWORK_SHARDING_POLICY_H_
7 
8 #include <string>
9 
10 #include "util/single_copy.h"
11 
12 namespace download {
13 
14 // Return values of the sharding policy classes (including custom classes)
19 };
20 
21 // List of available custom ShardingPolicy classes
24 };
25 
31  public:
33  virtual ~ShardingPolicy() {}
34 
35  virtual void AddProxy(const std::string &proxy) = 0;
36  virtual std::string GetNextProxy(const std::string *url,
37  const std::string &current_proxy,
38  size_t off) = 0;
39  // TODO(heretherebedragons) change return type to unsigned
40  virtual int32_t GetNumberOfProxiesOnline() = 0;
41  // TODO(heretherebedragons) change return type to std::vector<std::string>
42  virtual std::string GetProxyList() = 0;
43  virtual void LogProxyList() = 0;
44 };
45 
46 } // namespace download
47 
48 #endif // CVMFS_NETWORK_SHARDING_POLICY_H_
virtual std::string GetProxyList()=0
virtual std::string GetNextProxy(const std::string *url, const std::string &current_proxy, size_t off)=0
virtual void AddProxy(const std::string &proxy)=0
virtual int32_t GetNumberOfProxiesOnline()=0
virtual void LogProxyList()=0