libfoedus-core
FOEDUS Core Library
sequential_partitioner_impl.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_SEQUENTIAL_SEQUENTIAL_PARTITIONER_IMPL_HPP_
19 #define FOEDUS_STORAGE_SEQUENTIAL_SEQUENTIAL_PARTITIONER_IMPL_HPP_
20 
21 #include <stdint.h>
22 
23 #include <iosfwd>
24 
25 #include "foedus/error_stack.hpp"
26 #include "foedus/fwd.hpp"
27 #include "foedus/memory/fwd.hpp"
31 
32 namespace foedus {
33 namespace storage {
34 namespace sequential {
50 class SequentialPartitioner final {
51  public:
52  explicit SequentialPartitioner(Partitioner* parent);
53 
55  bool is_partitionable() const { return true; }
57  void sort_batch(const Partitioner::SortBatchArguments& args) const;
58 
59  friend std::ostream& operator<<(std::ostream& o, const SequentialPartitioner& v);
60 
61  private:
62  Engine* const engine_;
63  const StorageId id_;
64  PartitionerMetadata* const metadata_;
65 };
66 } // namespace sequential
67 } // namespace storage
68 } // namespace foedus
69 #endif // FOEDUS_STORAGE_SEQUENTIAL_SEQUENTIAL_PARTITIONER_IMPL_HPP_
Definitions of IDs in this package and a few related constant values.
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
Forward declarations of classes in root package.
Brings error stacktrace information as return value of functions.
Definition: error_stack.hpp:81
ErrorStack design_partition(const Partitioner::DesignPartitionArguments &args)
void sort_batch(const Partitioner::SortBatchArguments &args) const
friend std::ostream & operator<<(std::ostream &o, const SequentialPartitioner &v)
Database engine object that holds all resources and provides APIs.
Definition: engine.hpp:109
Definitions of IDs in this package and a few related constant values.
Forward declarations of classes in memory package.
Tiny metadata of partitioner for every storage used while log gleaning.
Partitioning and sorting logic for one storage.
Definition: partitioner.hpp:70
void partition_batch(const Partitioner::PartitionBatchArguments &args) const