libfoedus-core
FOEDUS Core Library
record.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_STORAGE_RECORD_HPP_
19 #define FOEDUS_STORAGE_RECORD_HPP_
20 #include "foedus/cxx11.hpp"
22 #include "foedus/xct/xct_id.hpp"
23 namespace foedus {
24 namespace storage {
40 
45  char payload_[8];
46 
48  Record(const Record& other) CXX11_FUNC_DELETE;
49  Record& operator=(const Record& other) CXX11_FUNC_DELETE;
50 };
51 
56 const uint16_t kRecordOverhead = sizeof(xct::RwLockableXctId);
57 
58 CXX11_STATIC_ASSERT(kRecordOverhead == sizeof(Record) - 8, "kRecordOverhead is incorrect");
59 
60 } // namespace storage
61 } // namespace foedus
62 #endif // FOEDUS_STORAGE_RECORD_HPP_
Represents one record in our key-value store.
Definition: record.hpp:33
Definitions of IDs in this package and a few related constant values.
const uint16_t kRecordOverhead
Byte size of system-managed region per each record.
Definition: record.hpp:56
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
The MCS reader-writer lock variant of LockableXctId.
Definition: xct_id.hpp:1132
char payload_[8]
Arbitrary payload given by the user.
Definition: record.hpp:45
Definitions of IDs in this package and a few related constant values.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
Definition: cxx11.hpp:131
#define CXX11_STATIC_ASSERT(expr, message)
Used in public headers in place of "static_assert" of C++11.
Definition: cxx11.hpp:135
#define CXX11_FUNC_DELETE
Used in public headers in place of " = delete" of C++11.
Definition: cxx11.hpp:128
xct::RwLockableXctId owner_id_
This indicates the transaction that most recently modified this record.
Definition: record.hpp:39