libfoedus-core
FOEDUS Core Library
cache_options.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP.
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by the Free
5  * Software Foundation; either version 2 of the License, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11  * more details. You should have received a copy of the GNU General Public
12  * License along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * HP designates this particular file as subject to the "Classpath" exception
16  * as provided by HP in the LICENSE.txt file that accompanied this code.
17  */
19 
21 
22 namespace foedus {
23 namespace cache {
30 }
31 ErrorStack CacheOptions::load(tinyxml2::XMLElement* element) {
41  return kRetOk;
42 }
43 ErrorStack CacheOptions::save(tinyxml2::XMLElement* element) const {
44  CHECK_ERROR(insert_comment(element, "Set of options for snapshot cache manager."));
46  "Whether to cache the read accesses on snapshot files.");
48  "Size of the snapshot cache in MB per each NUMA node.");
50  "How many pages for snapshot cache each NumaCoreMemory initially grabs"
51  " when it is initialized.");
55  element,
57  "When to start evicting pages in fraction of snapshot page pool capacity");
61  element,
63  "When the cache eviction performs in an urgent mode, which immediately advances"
64  " the current epoch to release pages");
65  return kRetOk;
66 }
67 
68 } // namespace cache
69 } // namespace foedus
#define EXTERNALIZE_LOAD_ELEMENT(element, attribute)
Reads a child xml element to load a member variable of this object.
ErrorStack save(tinyxml2::XMLElement *element) const override
Writes the content of this object to the given XML element.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
Brings error stacktrace information as return value of functions.
Definition: error_stack.hpp:81
static ErrorStack insert_comment(tinyxml2::XMLElement *element, const std::string &comment)
Max number of pointers to pack.
Definition: page_pool.hpp:54
bool snapshot_cache_enabled_
Whether to cache the read accesses on snapshot files.
CacheOptions()
Constructs option values with default values.
uint32_t private_snapshot_cache_initial_grab_
How many pages for snapshot cache each NumaCoreMemory initially grabs when it is initialized.
float snapshot_cache_urgent_threshold_
When the cache eviction performs in an urgent mode, which immediately advances the current epoch to r...
float snapshot_cache_eviction_threshold_
When to start evicting pages in fraction of snapshot page pool capacity.
#define CHECK_ERROR(x)
This macro calls x and checks its returned value.
const ErrorStack kRetOk
Normal return value for no-error case.
Default value for snapshot_cache_size_mb_per_node_.
uint32_t snapshot_cache_size_mb_per_node_
Size of the snapshot cache in MB per each NUMA node.
#define EXTERNALIZE_SAVE_ELEMENT(element, attribute, comment)
Adds an xml element to represent a member variable of this object.
ErrorStack load(tinyxml2::XMLElement *element) override
Reads the content of this object from the given XML element.
#define ASSERT_ND(x)
A warning-free wrapper macro of assert() that has no performance effect in release mode even when 'x'...
Definition: assert_nd.hpp:72