~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/transaction_reader.h

  • Committer: Jay Pipes
  • Date: 2009-09-15 21:01:42 UTC
  • mto: (1126.2.5 merge)
  • mto: This revision was merged to the branch mainline in revision 1128.
  • Revision ID: jpipes@serialcoder-20090915210142-x8mwiqn1q0vzjspp
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2008-2009 Sun Microsystems, Inc.
5
 
 *
6
 
 *  Authors:
7
 
 *
8
 
 *    Jay Pipes <joinfu@sun.com>
9
 
 *
10
 
 *  This program is free software; you can redistribute it and/or modify
11
 
 *  it under the terms of the GNU General Public License as published by
12
 
 *  the Free Software Foundation; version 2 of the License.
13
 
 *
14
 
 *  This program is distributed in the hope that it will be useful,
15
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 *  GNU General Public License for more details.
18
 
 *
19
 
 *  You should have received a copy of the GNU General Public License
20
 
 *  along with this program; if not, write to the Free Software
21
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
 
 */
23
 
 
24
 
#ifndef DRIZZLED_PLUGIN_TRANSACTION_READER_H
25
 
#define DRIZZLED_PLUGIN_TRANSACTION_READER_H
26
 
 
27
 
#include "drizzled/plugin/plugin.h"
28
 
#include "drizzled/replication_services.h" /* For global transaction ID typedef */
29
 
 
30
 
#include "drizzled/visibility.h"
31
 
 
32
 
/**
33
 
 * @file Defines the API for a TransactionReader
34
 
 *
35
 
 * A command reader is a class which is able to read Transaction messages from some source
36
 
 */
37
 
 
38
 
namespace drizzled
39
 
{
40
 
namespace message { class Transaction; }
41
 
 
42
 
namespace plugin
43
 
{
44
 
 
45
 
 
46
 
/**
47
 
 * Class which can read Transaction messages from some source
48
 
 */
49
 
class DRIZZLED_API TransactionReader : public Plugin
50
 
{
51
 
  TransactionReader();
52
 
  TransactionReader(const TransactionReader &);
53
 
  TransactionReader& operator=(const TransactionReader &);
54
 
public:
55
 
  explicit TransactionReader(std::string name_arg)
56
 
   : Plugin(name_arg, "TransactionReader") {}
57
 
  virtual ~TransactionReader() {}
58
 
  /**
59
 
   * Read and fill a Transaction message with the supplied
60
 
   * Transaction message global transaction ID.
61
 
   *
62
 
   * @param Global transaction ID to find
63
 
   * @param Pointer to a command message to fill
64
 
   *
65
 
   * @retval
66
 
   *  true if Transaction message was read successfully and the supplied pointer
67
 
   *  to message was filled
68
 
   * @retval
69
 
   *  false if not found or read successfully
70
 
   */
71
 
  virtual bool read(const ReplicationServices::GlobalTransactionId &to_read, 
72
 
                    message::Transaction *to_fill)= 0;
73
 
};
74
 
 
75
 
} /* end namespace plugin */
76
 
} /* end namespace drizzled */
77
 
 
78
 
#endif /* DRIZZLED_PLUGIN_TRANSACTION_READER_H */