blob: a160c8199fab7edf78aef896b2dbce6bac996d97 (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "i_compaction_context.h"
#include "entry_ref_filter.h"
namespace vespalib::datastore {
class CompactingBuffers;
struct ICompactable;
/**
* A compaction context is used when performing a compaction of data buffers in a data store.
*/
class CompactionContext : public ICompactionContext {
private:
ICompactable& _store;
std::unique_ptr<vespalib::datastore::CompactingBuffers> _compacting_buffers;
EntryRefFilter _filter;
public:
CompactionContext(ICompactable& store, std::unique_ptr<CompactingBuffers> compacting_buffers);
~CompactionContext() override;
void compact(vespalib::ArrayRef<AtomicEntryRef> refs) override;
};
}
|