CernVM-FS
2.12.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
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)
15
enum
ShardingPolicyReturn
{
16
kShardingPolicySucess
= 0,
17
kShardingPolicyProxySwitch
,
18
kShardingPolicyProxyFail
19
};
20
21
// List of available custom ShardingPolicy classes
22
enum
ShardingPolicySelector
{
23
kShardingPolicyExternal
24
};
25
30
class
ShardingPolicy
:
SingleCopy
{
31
public
:
32
ShardingPolicy
() {}
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 ¤t_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_
download::kShardingPolicyExternal
Definition:
sharding_policy.h:23
download::ShardingPolicy::GetProxyList
virtual std::string GetProxyList()=0
download::ShardingPolicy::GetNextProxy
virtual std::string GetNextProxy(const std::string *url, const std::string ¤t_proxy, size_t off)=0
download::kShardingPolicyProxyFail
Definition:
sharding_policy.h:18
download::ShardingPolicy::AddProxy
virtual void AddProxy(const std::string &proxy)=0
download::ShardingPolicy
Definition:
sharding_policy.h:30
download::ShardingPolicy::~ShardingPolicy
virtual ~ShardingPolicy()
Definition:
sharding_policy.h:33
SingleCopy
Definition:
single_copy.h:16
download::ShardingPolicyReturn
ShardingPolicyReturn
Definition:
sharding_policy.h:15
download::ShardingPolicy::ShardingPolicy
ShardingPolicy()
Definition:
sharding_policy.h:32
download::ShardingPolicy::GetNumberOfProxiesOnline
virtual int32_t GetNumberOfProxiesOnline()=0
single_copy.h
download::ShardingPolicy::LogProxyList
virtual void LogProxyList()=0
download::kShardingPolicyProxySwitch
Definition:
sharding_policy.h:17
download::kShardingPolicySucess
Definition:
sharding_policy.h:16
download::ShardingPolicySelector
ShardingPolicySelector
Definition:
sharding_policy.h:22
cvmfs
cvmfs
network
sharding_policy.h
Generated on Sun Dec 29 2024 01:18:12 for CernVM-FS by
1.8.5