aboutsummaryrefslogtreecommitdiffstats
path: root/storageframework
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-04 01:33:05 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-04 16:36:18 +0200
commit31fa22ae90c6481c6e70eb2381d63ecc9b6c6d42 (patch)
tree6b23d8432af75ebab042f67d8fd4a453a662c83d /storageframework
parent67e9b3bd5b22ae02c079e47e56ec9ad7fb7df402 (diff)
Use override
Diffstat (limited to 'storageframework')
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h26
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h6
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h10
-rw-r--r--storageframework/src/vespa/storageframework/generic/component/component.h5
4 files changed, 16 insertions, 31 deletions
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h
index 7eea530e229..41fb819ae68 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorymanager.h
@@ -122,7 +122,7 @@ public:
// vespalib::Printable implementation
virtual void print(std::ostream& out, bool verbose,
- const std::string& indent) const = 0;
+ const std::string& indent) const override = 0;
};
class MemoryManager : public vespalib::Printable,
@@ -138,28 +138,20 @@ public:
MemoryManager(AllocationLogic::UP);
~MemoryManager();
- virtual void setMaximumMemoryUsage(uint64_t max);
+ void setMaximumMemoryUsage(uint64_t max) override;
virtual void getState(MemoryState& state, bool resetMax = false);
- virtual const MemoryAllocationType&
- registerAllocationType(const MemoryAllocationType& type);
+ const MemoryAllocationType&registerAllocationType(const MemoryAllocationType& type) override;
+ const MemoryAllocationType&getAllocationType(const std::string& name) const override;
- virtual const MemoryAllocationType&
- getAllocationType(const std::string& name) const;
+ std::vector<const MemoryAllocationType*> getAllocationTypes() const override;
- virtual std::vector<const MemoryAllocationType*> getAllocationTypes() const;
-
- MemoryToken::UP allocate(
- const MemoryAllocationType&,
- uint64_t min,
- uint64_t max,
- uint8_t p,
- ReduceMemoryUsageInterface* = 0);
+ MemoryToken::UP allocate(const MemoryAllocationType&, uint64_t min, uint64_t max,
+ uint8_t p, ReduceMemoryUsageInterface* = 0) override;
- virtual uint64_t getMemorySizeFreeForPriority(uint8_t priority) const;
+ uint64_t getMemorySizeFreeForPriority(uint8_t priority) const override;
- virtual void print(std::ostream& out, bool verbose,
- const std::string& indent) const;
+ void print(std::ostream& out, bool verbose, const std::string& indent) const override;
};
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h
index f78927da6ce..e84e864d435 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/memory/memorystate.h
@@ -68,8 +68,7 @@ public:
SnapShot() : vespalib::Printable() { clear(); }
SnapShot(const SnapShot& o) : vespalib::Printable() { (*this) = o; }
- void print(std::ostream& out, bool verbose,
- const std::string& indent) const;
+ void print(std::ostream& out, bool verbose, const std::string& indent) const override;
void clear() {
_usedMemory = 0;
@@ -104,8 +103,7 @@ private:
public:
MemoryState(Clock& clock, uint64_t maxMemory);
- void print(std::ostream& out, bool verbose,
- const std::string& indent) const;
+ void print(std::ostream& out, bool verbose, const std::string& indent) const override;
void setMaximumMemoryUsage(uint64_t max) { _maxMemory = max; }
void setMinJumpToUpdateMax(uint32_t bytes) { _minJumpToUpdateMax = bytes; }
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h
index eda78bcc13b..7f88977bbc5 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h
@@ -24,18 +24,14 @@ public:
ThreadPoolImpl(Clock&);
~ThreadPoolImpl();
- Thread::UP startThread(Runnable&,
- vespalib::stringref id,
- uint64_t waitTimeMs,
- uint64_t maxProcessTime,
- int ticksBeforeWait);
- void visitThreads(ThreadVisitor&) const;
+ Thread::UP startThread(Runnable&, vespalib::stringref id, uint64_t waitTimeMs,
+ uint64_t maxProcessTime, int ticksBeforeWait) override;
+ void visitThreads(ThreadVisitor&) const override;
void registerThread(ThreadImpl&);
void unregisterThread(ThreadImpl&);
FastOS_ThreadPool& getThreadPool() { return _backendThreadPool; }
Clock& getClock() { return _clock; }
-
};
} // defaultimplementation
diff --git a/storageframework/src/vespa/storageframework/generic/component/component.h b/storageframework/src/vespa/storageframework/generic/component/component.h
index 8bbf0dc192a..5f55bb30397 100644
--- a/storageframework/src/vespa/storageframework/generic/component/component.h
+++ b/storageframework/src/vespa/storageframework/generic/component/component.h
@@ -105,9 +105,8 @@ class Component : private ManagedComponent
}
// ManagedComponent implementation
- metrics::Metric* getMetric() { return _metric; }
- std::pair<MetricUpdateHook*, SecondTime> getMetricUpdateHook()
- { return _metricUpdateHook; }
+ metrics::Metric* getMetric() override { return _metric; }
+ std::pair<MetricUpdateHook*, SecondTime> getMetricUpdateHook() override { return _metricUpdateHook; }
const StatusReporter* getStatusReporter() { return _status; }
void setMetricRegistrator(MetricRegistrator& mr);
void setMemoryManager(MemoryManagerInterface& mm) { _memoryManager = &mm; }