Infinispan HotRod C++ Client 9.2.0.Final
Loading...
Searching...
No Matches
CounterConfiguration.h
Go to the documentation of this file.
1/*
2 * CounterConfiguration.h
3 *
4 * Created on: May 3, 2018
5 * Author: rigazilla
6 */
7
8#ifndef INCLUDE_INFINISPAN_HOTROD_COUNTERCONFIGURATION_H_
9#define INCLUDE_INFINISPAN_HOTROD_COUNTERCONFIGURATION_H_
10
12#include <sstream>
13
14namespace infinispan {
15namespace hotrod {
16
17enum Storage {
20};
21
25 WEAK
26};
27
29public:
30
31 CounterConfiguration(long initialValue, long lowerBound, long upperBound, int concurrencyLevel,
32 CounterType type, Storage storage)
33 :
34 initialValue(initialValue),
35 upperBound(upperBound),
36 lowerBound(lowerBound),
37 concurrencyLevel(concurrencyLevel),
38 type(type),
39 storage(storage) {
40 }
41
42 long getInitialValue() const {
43 return initialValue;
44 }
45
46 long getUpperBound() const {
47 return upperBound;
48 }
49
50 long getLowerBound() const {
51 return lowerBound;
52 }
53
55 return type;
56 }
57
58 int getConcurrencyLevel() const {
59 return concurrencyLevel;
60 }
61
63 return storage;
64 }
65
66 std::string toString() const {
67 std::stringstream ss;
68 ss << "CounterConfiguration{" <<
69 "initialValue=" << initialValue <<
70 ", upperBound=" << upperBound <<
71 ", lowerBound=" << lowerBound <<
72 ", concurrencyLevel=" << concurrencyLevel <<
73 ", type=" << type <<
74 ", storage=" << storage <<
75 "}";
76 return ss.str();
77 }
78
79private:
80 const long initialValue;
81 const long upperBound;
82 const long lowerBound;
83 const int concurrencyLevel;
84 const CounterType type;
85 const Storage storage;
86};
87}
88}
89
90#endif /* INCLUDE_INFINISPAN_HOTROD_COUNTERCONFIGURATION_H_ */
#define HR_EXTERN
Definition: ImportExport.h:35
Definition: CounterConfiguration.h:28
long getInitialValue() const
Definition: CounterConfiguration.h:42
int getConcurrencyLevel() const
Definition: CounterConfiguration.h:58
Storage getStorage() const
Definition: CounterConfiguration.h:62
long getLowerBound() const
Definition: CounterConfiguration.h:50
std::string toString() const
Definition: CounterConfiguration.h:66
CounterType getType() const
Definition: CounterConfiguration.h:54
CounterConfiguration(long initialValue, long lowerBound, long upperBound, int concurrencyLevel, CounterType type, Storage storage)
Definition: CounterConfiguration.h:31
long getUpperBound() const
Definition: CounterConfiguration.h:46
Storage
Definition: CounterConfiguration.h:17
@ VOLATILE
Definition: CounterConfiguration.h:18
@ PERSISTENT
Definition: CounterConfiguration.h:19
CounterType
Definition: CounterConfiguration.h:22
@ UNBOUNDED_STRONG
Definition: CounterConfiguration.h:23
@ WEAK
Definition: CounterConfiguration.h:25
@ BOUNDED_STRONG
Definition: CounterConfiguration.h:24
Definition: AuthenticationConfiguration.h:10