|
iceberg-cpp
|
Thread-safe counter backed by std::atomic<int64_t>. More...
#include <counter.h>
Public Member Functions | |
| DefaultCounter (CounterUnit unit=CounterUnit::kCount) | |
| void | Increment (int64_t amount) override |
| Increment the counter by the given amount. | |
| int64_t | value () const override |
| Return the current count. | |
| CounterUnit | unit () const override |
| Return the unit for this counter. | |
| virtual void | Increment () |
| Increment the counter by 1. | |
| virtual void | Increment (int64_t amount)=0 |
| Increment the counter by the given amount. | |
Public Member Functions inherited from iceberg::Counter | |
| virtual bool | IsNoop () const |
| Return true if this counter is a no-op. | |
Additional Inherited Members | |
Static Public Member Functions inherited from iceberg::Counter | |
| static std::shared_ptr< Counter > | Noop () |
| Return a shared no-op counter singleton. | |
Thread-safe counter backed by std::atomic<int64_t>.
|
inlinevirtual |
Increment the counter by 1.
Reimplemented from iceberg::Counter.
|
overridevirtual |
Increment the counter by the given amount.
Implements iceberg::Counter.
|
virtual |
Increment the counter by the given amount.
Implements iceberg::Counter.
|
inlineoverridevirtual |
Return the unit for this counter.
Reimplemented from iceberg::Counter.
|
overridevirtual |
Return the current count.
Implements iceberg::Counter.