libfoedus-core
FOEDUS Core Library
snapshot.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 <ostream>
21 
22 namespace foedus {
23 namespace snapshot {
24 std::ostream& operator<<(std::ostream& o, const Snapshot& v) {
25  o << "<Snapshot>"
26  << "<id_>" << v.id_ << "</id_>"
27  << "<base_epoch_>" << v.base_epoch_ << "</base_epoch_>"
28  << "<valid_until_epoch_>" << v.valid_until_epoch_ << "</valid_until_epoch_>"
29  << "<max_storage_id_>" << v.max_storage_id_ << "</max_storage_id_>"
30  << "</Snapshot>";
31  return o;
32 }
33 } // namespace snapshot
34 } // namespace foedus
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
Epoch valid_until_epoch_
This snapshot contains all the logs until this epoch.
Definition: snapshot.hpp:55
storage::StorageId max_storage_id_
Largest storage ID as of starting to take the snapshot.
Definition: snapshot.hpp:58
SnapshotId id_
Unique ID of this snapshot.
Definition: snapshot.hpp:43
Represents one snapshot that converts all logs from base epoch to valid_until epoch into snapshot fil...
Definition: snapshot.hpp:37
Epoch base_epoch_
This snapshot was taken on top of previous snapshot that is valid_until this epoch.
Definition: snapshot.hpp:49
std::ostream & operator<<(std::ostream &o, const SortedBuffer &v)
Definition: log_buffer.cpp:32