QuantumLibrary
quantum_sequence_key_statistics_impl.h
1 /*
2 ** Copyright 2018 Bloomberg Finance L.P.
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 //NOTE: DO NOT INCLUDE DIRECTLY
17 
18 //##############################################################################################
19 //#################################### IMPLEMENTATIONS #########################################
20 //##############################################################################################
21 
22 namespace Bloomberg {
23 namespace quantum {
24 
25 inline
27  _postedTaskCount(that._postedTaskCount),
28  _pendingTaskCount(that._pendingTaskCount.load())
29 {
30 }
31 
32 inline
34  _postedTaskCount(std::move(that._postedTaskCount)),
35  _pendingTaskCount(that._pendingTaskCount.load())
36 {
37 }
38 
39 inline
41 {
42  _postedTaskCount = std::move(that._postedTaskCount);
43  _pendingTaskCount = that._pendingTaskCount.load();
44  return *this;
45 }
46 
47 inline
49 {
52  return *this;
53 }
54 
55 inline
56 size_t
58 {
59  return _postedTaskCount;
60 }
61 
62 inline
63 size_t
65 {
66  return _pendingTaskCount;
67 }
68 
69 inline
70 void
72 {
74 }
75 
76 inline
77 void
79 {
81 }
82 
83 inline
84 void
86 {
88 }
89 
90 }}
Definition: quantum_buffer_impl.h:22
void incrementPendingTaskCount()
Increments the total number of pending tasks associated with the key.
Definition: quantum_sequence_key_statistics_impl.h:78
std::atomic< size_t > _pendingTaskCount
Number of pending tasks associated with the sequence key.
Definition: quantum_sequence_key_statistics.h:64
void incrementPostedTaskCount()
Increments the total number of tasks associated with the key that have been posted to the Sequencer s...
Definition: quantum_sequence_key_statistics_impl.h:71
Definition: quantum_stl_impl.h:23
void decrementPendingTaskCount()
Increments the total number of pending tasks associated with the key.
Definition: quantum_sequence_key_statistics_impl.h:85
SequenceKeyStatistics()=default
Constructor.
Implementation of a statistics collection for a SequenceKey in Sequencer.
Definition: quantum_sequence_key_statistics.h:32
size_t _postedTaskCount
Number of posted tasks associated with the sequence key.
Definition: quantum_sequence_key_statistics.h:62
size_t getPostedTaskCount() const
Gets the total number of tasks associated with the key that have been posted to the Sequencer since t...
Definition: quantum_sequence_key_statistics_impl.h:57
SequenceKeyStatistics & operator=(const SequenceKeyStatistics &that)
Assignment operator.
Definition: quantum_sequence_key_statistics_impl.h:48
size_t getPendingTaskCount() const
Gets the total number of pending tasks associated with the key.
Definition: quantum_sequence_key_statistics_impl.h:64