blob: c72cd8067983c61ff8bec7110e3b7636b31ac9d4 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "atomic_entry_ref.h"
#include <vespa/vespalib/util/arrayref.h>
#include <memory>
namespace vespalib::datastore {
/**
* A compaction context is used when performing a compaction of data buffers in a data store.
*
* All entry refs pointing to allocated data in the store must be passed to the compaction context
* such that these can be updated according to the buffer compaction that happens internally.
*/
struct ICompactionContext {
using UP = std::unique_ptr<ICompactionContext>;
virtual ~ICompactionContext() {}
virtual void compact(vespalib::ArrayRef<AtomicEntryRef> refs) = 0;
};
}
|