libfoedus-core
FOEDUS Core Library
foedus::snapshot::Snapshot Struct Reference

Represents one snapshot that converts all logs from base epoch to valid_until epoch into snapshot file(s). More...

Detailed Description

Represents one snapshot that converts all logs from base epoch to valid_until epoch into snapshot file(s).

This is POD and no heap-allocated data, so it can be directly placed in shared memory.

Definition at line 37 of file snapshot.hpp.

#include <snapshot.hpp>

Collaboration diagram for foedus::snapshot::Snapshot:

Public Member Functions

void clear ()
 

Public Attributes

SnapshotId id_
 Unique ID of this snapshot. More...
 
Epoch base_epoch_
 This snapshot was taken on top of previous snapshot that is valid_until this epoch. More...
 
Epoch valid_until_epoch_
 This snapshot contains all the logs until this epoch. More...
 
storage::StorageId max_storage_id_
 Largest storage ID as of starting to take the snapshot. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Snapshot &v)
 

Member Function Documentation

void foedus::snapshot::Snapshot::clear ( )
inline

Definition at line 61 of file snapshot.hpp.

References foedus::INVALID_EPOCH.

Referenced by foedus::snapshot::LogGleanerControlBlock::clear_counts().

61  {
62  id_ = 0;
65  max_storage_id_ = 0;
66  }
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
Epoch base_epoch_
This snapshot was taken on top of previous snapshot that is valid_until this epoch.
Definition: snapshot.hpp:49
const Epoch INVALID_EPOCH
A constant epoch object that represents an invalid epoch.
Definition: epoch.hpp:204

Here is the caller graph for this function:

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Snapshot v 
)
friend

Definition at line 24 of file snapshot.cpp.

24  {
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 }

Member Data Documentation

Epoch foedus::snapshot::Snapshot::base_epoch_

This snapshot was taken on top of previous snapshot that is valid_until this epoch.

If this is the first snapshot, this is an invalid epoch.

Definition at line 49 of file snapshot.hpp.

Referenced by foedus::snapshot::LogGleanerRef::get_base_epoch(), foedus::snapshot::SnapshotManagerPimpl::handle_snapshot_triggered(), foedus::snapshot::operator<<(), foedus::snapshot::SnapshotManagerPimpl::snapshot_metadata(), and foedus::snapshot::LogReducerRef::verify_log_chunk().


The documentation for this struct was generated from the following file: