blob: 3c842b2316cf6e7bd3db365a50498cceb9881436 (
plain)
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
|
/*
* include/framework/reconstruction/ReconstructionPolicy.h
*
* Reconstruction class interface, used to implement custom reconstruction
* policies.
*
* Copyright (C) 2023-2024 Douglas B. Rumbaugh <drumbaugh@psu.edu>
* Dong Xie <dongx@psu.edu>
*
* Distributed under the Modified BSD License.
*
*/
#pragma once
#include "framework/scheduling/LockManager.h"
#include "framework/scheduling/Version.h"
#include "framework/structure/ExtensionStructure.h"
#include "util/types.h"
namespace de {
template <ShardInterface ShardType, QueryInterface<ShardType> QueryType>
class ReconstructionPolicy {
typedef ExtensionStructure<ShardType, QueryType> StructureType;
public:
ReconstructionPolicy() {}
virtual std::vector<ReconstructionVector>
get_reconstruction_tasks(const Version<ShardType, QueryType> *version,
LockManager &lock_mngr) const = 0;
virtual ReconstructionVector
get_flush_tasks(const Version<ShardType, QueryType> *version) const = 0;
};
} // namespace de
|