libfoedus-core
FOEDUS Core Library
storage.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 
20 #include "foedus/engine.hpp"
22 
23 namespace foedus {
24 namespace storage {
25 
27  return engine->get_storage_manager()->get_storage(id);
28 }
30  return engine->get_storage_manager()->get_storage(name);
31 }
32 
33 } // namespace storage
34 } // namespace foedus
storage::StorageManager * get_storage_manager() const
See Storage Manager.
Definition: engine.cpp:60
uint32_t StorageId
Unique ID for storage.
Definition: storage_id.hpp:55
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
StorageControlBlock * get_storage_control_block(Engine *engine, StorageId id)
Definition: storage.cpp:26
Database engine object that holds all resources and provides APIs.
Definition: engine.hpp:109
StorageControlBlock * get_storage(StorageId id)
Returns the storage of given ID.
A base layout of shared data for all storage types.
Definition: storage.hpp:53