reconnect_options.hpp
Go to the documentation of this file.
#ifndef PROTON_RECONNECT_OPTIONS_HPP
#define PROTON_RECONNECT_OPTIONS_HPP
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#include "./internal/export.hpp"
#include "./internal/pn_unique_ptr.hpp"
#include "./duration.hpp"
#include "./source.hpp"
#include <string>
#include <vector>
namespace proton {
class reconnect_options {
public:
PN_CPP_EXTERN reconnect_options();
PN_CPP_EXTERN reconnect_options(const reconnect_options&);
PN_CPP_EXTERN ~reconnect_options();
PN_CPP_EXTERN reconnect_options& operator=(const reconnect_options&);
PN_CPP_EXTERN reconnect_options& delay(duration);
PN_CPP_EXTERN reconnect_options& delay_multiplier(float);
PN_CPP_EXTERN reconnect_options& max_delay(duration);
PN_CPP_EXTERN reconnect_options& max_attempts(int);
PN_CPP_EXTERN reconnect_options& failover_urls(const std::vector<std::string>& conn_urls);
private:
class impl;
internal::pn_unique_ptr<impl> impl_;
friend class container;
};
} // proton
#endif // PROTON_RECONNECT_OPTIONS_HPP
proton::container
A top-level container of connections, sessions, and links.
Definition: container.hpp:50
proton::duration
A span of time in milliseconds.
Definition: duration.hpp:39
proton::reconnect_options
Unsettled API - Options for reconnect and failover after connection loss.
Definition: reconnect_options.hpp:49
proton::reconnect_options::failover_urls
reconnect_options & failover_urls(const std::vector< std::string > &conn_urls)
Alternative connection URLs used for failover.
proton::reconnect_options::delay
reconnect_options & delay(duration)
The base value for recurring delays.
proton::reconnect_options::max_delay
reconnect_options & max_delay(duration)
The maximum delay between successive connect attempts.
proton::reconnect_options::max_attempts
reconnect_options & max_attempts(int)
The maximum number of reconnect attempts.
proton::reconnect_options::delay_multiplier
reconnect_options & delay_multiplier(float)
The scaling multiplier for successive reconnect delays.
proton::reconnect_options::reconnect_options
reconnect_options()
Create an empty set of options.
proton::reconnect_options::operator=
reconnect_options & operator=(const reconnect_options &)
Copy options.
proton::reconnect_options::reconnect_options
reconnect_options(const reconnect_options &)
Copy options.
duration.hpp
A span of time in milliseconds.
proton
The main Proton namespace.
Definition: annotation_key.hpp:33
source.hpp
A point of origin for messages.