1 /*
2    Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License, version 2.0,
6    as published by the Free Software Foundation.
7 
8    This program is also distributed with certain software (including
9    but not limited to OpenSSL) that is licensed under separate terms,
10    as designated in a particular file or component or in included license
11    documentation.  The authors of MySQL hereby grant you an additional
12    permission to link the program and your derivative works with the
13    separately licensed software that they have included with MySQL.
14 
15    This program is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18    GNU General Public License, version 2.0, for more details.
19 
20    You should have received a copy of the GNU General Public License
21    along with this program; if not, write to the Free Software
22    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
23 */
24 
25 #ifndef CONSUMER_HPP
26 #define CONSUMER_HPP
27 
28 #include "Restore.hpp"
29 #include "ndb_nodegroup_map.h"
30 
31 #include "../../../../sql/ha_ndbcluster_tables.h"
32 
33 class BackupConsumer {
34 public:
BackupConsumer()35   BackupConsumer() {}
~BackupConsumer()36   virtual ~BackupConsumer() { }
init(Uint32 tableCompabilityMask)37   virtual bool init(Uint32 tableCompabilityMask) { return true;}
object(Uint32 tableType,const void *)38   virtual bool object(Uint32 tableType, const void*) { return true;}
table(const TableS &)39   virtual bool table(const TableS &){return true;}
endOfTables()40   virtual bool endOfTables() { return true; }
tuple(const TupleS &,Uint32 fragId)41   virtual void tuple(const TupleS &, Uint32 fragId){}
tuple_free()42   virtual void tuple_free(){}
endOfTuples()43   virtual void endOfTuples(){}
logEntry(const LogEntry &)44   virtual void logEntry(const LogEntry &){}
endOfLogEntrys()45   virtual void endOfLogEntrys(){}
finalize_table(const TableS &)46   virtual bool finalize_table(const TableS &){return true;}
rebuild_indexes(const TableS &)47   virtual bool rebuild_indexes(const TableS &) { return true;}
createSystable(const TableS &)48   virtual bool createSystable(const TableS &){ return true;}
update_apply_status(const RestoreMetaData & metaData)49   virtual bool update_apply_status(const RestoreMetaData &metaData){return true;}
report_started(unsigned backup_id,unsigned node_id)50   virtual bool report_started(unsigned backup_id, unsigned node_id)
51     {return true;}
report_meta_data(unsigned backup_id,unsigned node_id)52   virtual bool report_meta_data(unsigned backup_id, unsigned node_id)
53     {return true;}
report_data(unsigned backup_id,unsigned node_id)54   virtual bool report_data(unsigned backup_id, unsigned node_id)
55     {return true;}
report_log(unsigned backup_id,unsigned node_id)56   virtual bool report_log(unsigned backup_id, unsigned node_id)
57     {return true;}
report_completed(unsigned backup_id,unsigned node_id)58   virtual bool report_completed(unsigned backup_id, unsigned node_id)
59     {return true;}
60   NODE_GROUP_MAP *m_nodegroup_map;
61   uint            m_nodegroup_map_len;
has_temp_error()62   virtual bool has_temp_error() {return false;}
table_equal(const TableS &)63   virtual bool table_equal(const TableS &) { return true; }
table_compatible_check(const TableS &)64   virtual bool table_compatible_check(const TableS &) {return true;}
65 };
66 
67 #endif
68