pulsar-client-cpp
Loading...
Searching...
No Matches
KeySharedPolicy.h
1
19#pragma once
20
21#include <pulsar/defines.h>
22
23#include <memory>
24#include <utility>
25#include <vector>
26
27namespace pulsar {
28
33{
34
39
44 STICKY = 1
45};
46
47struct KeySharedPolicyImpl;
48
49typedef std::pair<int, int> StickyRange;
50typedef std::vector<StickyRange> StickyRanges;
51
52class PULSAR_PUBLIC KeySharedPolicy {
53 public:
56
58 KeySharedPolicy& operator=(const KeySharedPolicy&);
59
65
73
78
89 KeySharedPolicy& setAllowOutOfOrderDelivery(bool allowOutOfOrderDelivery);
90
95
100 KeySharedPolicy& setStickyRanges(std::initializer_list<StickyRange> ranges);
101
105 KeySharedPolicy& setStickyRanges(const StickyRanges& ranges);
106
110 StickyRanges getStickyRanges() const;
111
112 private:
113 std::shared_ptr<KeySharedPolicyImpl> impl_;
114};
115} // namespace pulsar
Definition KeySharedPolicy.h:52
KeySharedPolicy clone() const
KeySharedMode getKeySharedMode() const
KeySharedPolicy & setAllowOutOfOrderDelivery(bool allowOutOfOrderDelivery)
KeySharedPolicy & setKeySharedMode(KeySharedMode keySharedMode)
StickyRanges getStickyRanges() const
KeySharedPolicy & setStickyRanges(const StickyRanges &ranges)
bool isAllowOutOfOrderDelivery() const
KeySharedPolicy & setStickyRanges(std::initializer_list< StickyRange > ranges)
Definition Authentication.h:31
KeySharedMode
Definition KeySharedPolicy.h:33
@ AUTO_SPLIT
Definition KeySharedPolicy.h:38
@ STICKY
Definition KeySharedPolicy.h:44