LineairDB  0.1.0
config.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Nippon Telegraph and Telephone Corporation.
3 
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7 
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef LINEAIRDB_CONFIG_H
18 #define LINEAIRDB_CONFIG_H
19 
20 #include <cstddef>
21 #include <thread>
22 #include <string>
23 
24 namespace LineairDB {
25 
30 struct Config {
38  size_t max_thread = std::thread::hardware_concurrency();
53  size_t epoch_duration_ms = 40;
54 
65 
76 
87 
98 
105  bool enable_recovery = true;
106 
113  bool enable_logging = true;
114 
131  bool enable_checkpointing = true;
132 
141  size_t checkpoint_period = 30;
149  std::string work_dir = "./lineairdb_logs";
150 };
151 } // namespace LineairDB
152 
153 #endif
LineairDB::Config::ConcurrencyControl
ConcurrencyControl
Definition: config.h:55
LineairDB::Config::ThreadLocal
@ ThreadLocal
Definition: config.h:88
LineairDB::Config::Silo
@ Silo
Definition: config.h:55
LineairDB::Config::max_thread
size_t max_thread
The size of thread pool.
Definition: config.h:38
LineairDB::Config::HashTableWithPrecisionLockingIndex
@ HashTableWithPrecisionLockingIndex
Definition: config.h:77
LineairDB::Config::enable_checkpointing
bool enable_checkpointing
If true, LineairDB performs logging for checkpoint-recovery. Checkpointing prevents the log file size...
Definition: config.h:131
LineairDB::Config::epoch_duration_ms
size_t epoch_duration_ms
The size of epoch duration (milliseconds). See [Tu13, Chandramouli18] to get more details of epoch-ba...
Definition: config.h:53
LineairDB::Config
Configuration and options for LineairDB instances.
Definition: config.h:30
LineairDB::Config::IndexStructure
IndexStructure
Definition: config.h:77
LineairDB::Config::SiloNWR
@ SiloNWR
Definition: config.h:55
LineairDB::Config::work_dir
std::string work_dir
The directory path that lineardb use as working directory. All of data, logs and related files are st...
Definition: config.h:149
LineairDB::Config::concurrency_control_protocol
ConcurrencyControl concurrency_control_protocol
Set a concurrency control algorithm. See LineairDB::Config::ConcurrencyControl for the enum options o...
Definition: config.h:64
LineairDB::Config::logger
Logger logger
Set a logging algorithm. See LineairDB::Config::Logger for the enum options of this configuration.
Definition: config.h:75
LineairDB::Config::enable_logging
bool enable_logging
If true, LineairDB performs logging for recovery.
Definition: config.h:113
LineairDB::Config::TwoPhaseLocking
@ TwoPhaseLocking
Definition: config.h:55
LineairDB::Config::ThreadLocalLogger
@ ThreadLocalLogger
Definition: config.h:66
LineairDB
Definition: config.h:24
LineairDB::Config::index_structure
IndexStructure index_structure
Set the type of index. See LineairDB::Config::IndexStructure for the enum options of this configurati...
Definition: config.h:86
LineairDB::Config::enable_recovery
bool enable_recovery
If true, LineairDB processes recovery at the instantiation.
Definition: config.h:105
LineairDB::Config::checkpoint_period
size_t checkpoint_period
It uses as the interval time (seconds) for checkpointing. The longer is the better for the performanc...
Definition: config.h:141
LineairDB::Config::CallbackEngine
CallbackEngine
Definition: config.h:88
LineairDB::Config::Logger
Logger
Definition: config.h:66
LineairDB::Config::callback_engine
CallbackEngine callback_engine
Set the type of callback engine. See LineairDB::Config::CallBackEngine for the enum options of this c...
Definition: config.h:97