Qpid Proton C++ API 0.40.0
 
Loading...
Searching...
No Matches
reconnect_options.hpp
Go to the documentation of this file.
1#ifndef PROTON_RECONNECT_OPTIONS_HPP
2#define PROTON_RECONNECT_OPTIONS_HPP
3
4/*
5 *
6 * Licensed to the Apache Software Foundation (ASF) under one
7 * or more contributor license agreements. See the NOTICE file
8 * distributed with this work for additional information
9 * regarding copyright ownership. The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License. You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied. See the License for the
20 * specific language governing permissions and limitations
21 * under the License.
22 *
23 */
24
25#include "./internal/export.hpp"
26#include "./duration.hpp"
27#include "./source.hpp"
28
29#include <memory>
30#include <string>
31#include <vector>
32
35
36namespace proton {
37
49 public:
51 PN_CPP_EXTERN reconnect_options();
52
54 PN_CPP_EXTERN reconnect_options(const reconnect_options&);
55
56 PN_CPP_EXTERN ~reconnect_options();
57
60
64
67 PN_CPP_EXTERN reconnect_options& delay_multiplier(float);
68
72
75 PN_CPP_EXTERN reconnect_options& max_attempts(int);
76
80 PN_CPP_DEPRECATED("use connection_options::failover_urls()")
81 PN_CPP_EXTERN reconnect_options& failover_urls(const std::vector<std::string>& conn_urls);
82
83 private:
84 class impl;
85 std::unique_ptr<impl> impl_;
86
88 friend class connection_options;
89 friend class container;
91};
92
93} // proton
94
95#endif // PROTON_RECONNECT_OPTIONS_HPP
Options for creating a connection.
Definition connection_options.hpp:67
A top-level container of connections, sessions, and links.
Definition container.hpp:50
A span of time in milliseconds.
Definition duration.hpp:39
Options for reconnect and failover after connection loss.
Definition reconnect_options.hpp:48
reconnect_options & delay_multiplier(float)
The scaling multiplier for successive reconnect delays.
reconnect_options & failover_urls(const std::vector< std::string > &conn_urls)
Deprecated - use connection_options::failover_urls Alternative connection URLs used for failover.
reconnect_options & delay(duration)
The base value for recurring delays.
reconnect_options & max_attempts(int)
The maximum number of reconnect attempts.
reconnect_options()
Create an empty set of options.
reconnect_options & max_delay(duration)
The maximum delay between successive connect attempts.
reconnect_options(const reconnect_options &)
Copy options.
reconnect_options & operator=(const reconnect_options &)
Copy options.
A span of time in milliseconds.
The main Proton namespace.
Definition annotation_key.hpp:33
A point of origin for messages.