Red Hat Data Grid HotRod C++ Client  7.2.0
FailOverRequestBalancingStrategy.h
Go to the documentation of this file.
1 #ifndef ISPN_HOTROD_TRANSPORT_FAILOVERREQUESTBALANCINGSTRATEGY_H
2 #define ISPN_HOTROD_TRANSPORT_FAILOVERREQUESTBALANCINGSTRATEGY_H
3 
5 #include <vector>
6 #include <set>
7 
8 namespace infinispan {
9 namespace hotrod {
10 
16 {
17  public:
19  typedef FailOverRequestBalancingStrategy* (*ProducerFn)();
24  virtual void setServers(const std::vector<transport::InetSocketAddress>& servers) = 0;
29  virtual const transport::InetSocketAddress& nextServer(const std::set<transport::InetSocketAddress>& failedServers) = 0;
30 
32  private:
33  std::vector<transport::InetSocketAddress> servers;
34  size_t index;
35 
36 };
37 
38 }} // namespace infinispan::hotrod::transport
39 
40 #endif /* ISPN_HOTROD_TRANSPORT_FAILOVERREQUESTBALANCINGSTRATEGY_H */
Definition: FailOverRequestBalancingStrategy.h:15
virtual const transport::InetSocketAddress & nextServer(const std::set< transport::InetSocketAddress > &failedServers)=0
Definition: AuthenticationConfiguration.h:10
virtual ~FailOverRequestBalancingStrategy()
Definition: FailOverRequestBalancingStrategy.h:31
virtual void setServers(const std::vector< transport::InetSocketAddress > &servers)=0