libfoedus-core
FOEDUS Core Library
log_gleaner_ref.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_SNAPSHOT_LOG_GLEANER_REF_HPP_
19 #define FOEDUS_SNAPSHOT_LOG_GLEANER_REF_HPP_
20 
21 #include <stdint.h>
22 
23 #include "foedus/attachable.hpp"
24 #include "foedus/epoch.hpp"
25 #include "foedus/fwd.hpp"
26 #include "foedus/snapshot/fwd.hpp"
28 #include "foedus/storage/fwd.hpp"
29 
30 namespace foedus {
31 namespace snapshot {
36 class LogGleanerRef : public Attachable<LogGleanerControlBlock> {
37  public:
38  LogGleanerRef();
39  explicit LogGleanerRef(Engine* engine);
40 
41  bool is_error() const;
42  void wakeup();
43 
44  const Snapshot& get_cur_snapshot() const;
46  Epoch get_base_epoch() const;
48 
49  uint16_t increment_completed_count();
51  uint16_t increment_error_count();
52  uint16_t increment_exit_count();
53 
54  bool is_all_exitted() const;
55  bool is_all_completed() const;
56  bool is_all_mappers_completed() const;
57  uint16_t get_mappers_count() const;
58  uint16_t get_reducers_count() const;
59  uint16_t get_all_count() const;
60 
61  protected:
64 };
65 
66 } // namespace snapshot
67 } // namespace foedus
68 #endif // FOEDUS_SNAPSHOT_LOG_GLEANER_REF_HPP_
storage::PartitionerMetadata * partitioner_metadata_
Typedefs of ID types used in snapshot package.
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
Forward declarations of classes in root package.
Forward declarations of classes in snapshot manager package.
Represents a time epoch.
Definition: epoch.hpp:61
Forward declarations of classes in storage package.
SnapshotId get_snapshot_id() const
Database engine object that holds all resources and provides APIs.
Definition: engine.hpp:109
Represents one snapshot that converts all logs from base epoch to valid_until epoch into snapshot fil...
Definition: snapshot.hpp:37
Attachable Resources on Shared Memory.
Definition: attachable.hpp:58
uint16_t SnapshotId
Unique ID of Snapshot.
Definition: snapshot_id.hpp:43
Tiny metadata of partitioner for every storage used while log gleaning.
const Snapshot & get_cur_snapshot() const
A remote view of LogGleaner from all engines.