libfoedus-core
FOEDUS Core Library
restart_manager_pimpl.hpp
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  */
18 #ifndef FOEDUS_RESTART_RESTART_MANAGER_PIMPL_HPP_
19 #define FOEDUS_RESTART_RESTART_MANAGER_PIMPL_HPP_
20 
21 #include "foedus/fwd.hpp"
22 #include "foedus/initializable.hpp"
23 #include "foedus/restart/fwd.hpp"
25 
26 namespace foedus {
27 namespace restart {
30  // this is backed by shared memory. not instantiation. just reinterpret_cast.
31  RestartManagerControlBlock() = delete;
32  ~RestartManagerControlBlock() = delete;
33 
34  // nothing so far
35 };
36 
45  public:
46  RestartManagerPimpl() = delete;
47  explicit RestartManagerPimpl(Engine* engine) : engine_(engine) {}
48  ErrorStack initialize_once() override;
49  ErrorStack uninitialize_once() override;
50 
60  ErrorStack redo_meta_logs(Epoch durable_epoch, Epoch snapshot_epoch);
61 
62  Engine* const engine_;
64 };
65 
66 
67 static_assert(
69  "RestartManagerControlBlock is too large.");
70 } // namespace restart
71 } // namespace foedus
72 #endif // FOEDUS_RESTART_RESTART_MANAGER_PIMPL_HPP_
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
Definition: error_stack.hpp:81
Represents a time epoch.
Definition: epoch.hpp:61
Typical implementation of Initializable as a skeleton base class.
Forward declarations of classes in restart package.
RestartManagerControlBlock * control_block_
Pimpl object of RestartManager.
Database engine object that holds all resources and provides APIs.
Definition: engine.hpp:109
ErrorStack recover()
Recover the state of database from recent snapshot files and transaction logs.
Shared data in RestartManagerPimpl.
ErrorStack redo_meta_logs(Epoch durable_epoch, Epoch snapshot_epoch)
Redo metadata operation (create/drop storage) since the latest snapshot.