blob: 11ecb4e93efca930daadb218c95a99fd4617dbb5 (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/vespalib/datastore/compaction_spec.h>
namespace search { class IEnumStore; }
namespace vespalib { class MemoryUsage; }
namespace vespalib::datastore { class CompactionStrategy; }
namespace search::enumstore {
/*
* Class describing how to compact an enum store
*/
class EnumStoreCompactionSpec {
using CompactionSpec = vespalib::datastore::CompactionSpec;
CompactionSpec _values;
bool _btree_dictionary;
bool _hash_dictionary;
public:
EnumStoreCompactionSpec() noexcept
: _values(),
_btree_dictionary(false),
_hash_dictionary(false)
{
}
CompactionSpec get_values() const noexcept { return _values; }
bool btree_dictionary() const noexcept { return _btree_dictionary; }
bool hash_dictionary() const noexcept { return _hash_dictionary; }
vespalib::MemoryUsage update_stat(IEnumStore& enum_store, const vespalib::datastore::CompactionStrategy &compaction_strategy);
};
}
|