summaryrefslogtreecommitdiffstats
path: root/include/framework/reconstruction/ReconstructionPolicy.h
blob: 2c737de09ef11a4a4d0a5c0815b640f1d3077deb (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
/*
 * 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 "util/types.h"
#include "framework/structure/ExtensionStructure.h"
#include "framework/scheduling/Epoch.h"

namespace de {
template<ShardInterface ShardType, QueryInterface<ShardType> QueryType>
class ReconstructionPolicy {
  typedef ExtensionStructure<ShardType, QueryType> StructureType;

public:
  ReconstructionPolicy() {}
  virtual ReconstructionVector get_reconstruction_tasks(const Version<ShardType, QueryType> *version, 
                                                        size_t incoming_reccnt) const = 0;
  virtual ReconstructionVector get_flush_tasks(const Version<ShardType, QueryType> *version) const = 0;
  };
}