0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TableCallback.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
22 #ifndef Hypertable_Lib_TableCallback_h
23 #define Hypertable_Lib_TableCallback_h
24 
25 #include "ResultCallback.h"
26 
27 namespace Hypertable {
28 
29  class TableScanner;
30  class TableMutator;
31 
34  class TableCallback: public ResultCallback {
35 
36  public:
37 
38  TableCallback(TableScanner *scanner) : m_scanner(scanner) {};
39  TableCallback(TableMutator *mutator) : m_mutator(mutator) {};
40 
47  void scan_ok(TableScannerAsync *scanner, ScanCellsPtr &cells);
48 
57  void scan_error(TableScannerAsync *scanner, int error, const std::string &error_msg,
58  bool eos);
59 
65  void update_ok(TableMutatorAsync *mutator);
66 
74  void update_error(TableMutatorAsync *mutator, int error, FailedMutations &failures);
75 
76  private:
79 
80  };
81 
82 }
83 
84 #endif // Hypertable_Lib_TableCallback_h
void update_ok(TableMutatorAsync *mutator)
Callback method for successful mutations.
TableScanner * m_scanner
Definition: TableCallback.h:77
TableCallback(TableMutator *mutator)
Definition: TableCallback.h:39
Asynchronous table scanner.
TableMutator * m_mutator
Definition: TableCallback.h:78
void scan_error(TableScannerAsync *scanner, int error, const std::string &error_msg, bool eos)
Callback method for scan errors.
void update_error(TableMutatorAsync *mutator, int error, FailedMutations &failures)
Callback method for mutation errors.
Provides the ability to mutate a table in the form of adding and deleting rows and cells...
Represents an open table.
Definition: TableCallback.h:34
Provides the ability to mutate a table in the form of adding and deleting rows and cells...
Definition: TableMutator.h:55
std::shared_ptr< ScanCells > ScanCellsPtr
Smart pointer to ScanCells.
Definition: ScanCells.h:143
Synchronous table scanner.
Definition: TableScanner.h:39
TableCallback(TableScanner *scanner)
Definition: TableCallback.h:38
Hypertable definitions
void scan_ok(TableScannerAsync *scanner, ScanCellsPtr &cells)
Callback method for successful scan.
Represents an open table.
std::vector< FailedMutation > FailedMutations
Definition: Cells.h:39