blob: cafed748d9ba6b4667b8744ef83aa4f370a557af (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* @class DiskThread
* @ingroup persistence
*
* @brief Implements the public API of the disk threads.
*
* The disk threads have a tiny interface as they pull messages of the disk
* queue themselves. Thus it is easy to provide multiple implementations of it.
* The diskthread implements the common functionality needed above, currently
* for the filestor manager.
*/
#pragma once
#include <vespa/storageframework/generic/thread/runnable.h>
#include <memory>
namespace storage::framework { class Thread; }
namespace storage {
class DiskThread : public framework::Runnable
{
public:
using SP = std::shared_ptr<DiskThread>;
DiskThread(const DiskThread &) = delete;
DiskThread & operator = (const DiskThread &) = delete;
DiskThread() = default;
virtual ~DiskThread() = default;
/** Waits for current operation to be finished. */
virtual void flush() = 0;
virtual framework::Thread& getThread() = 0;
};
}
|