~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/transaction_reader.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-09-13 01:03:01 UTC
  • mto: (1126.9.2 captain-20090915-01)
  • mto: This revision was merged to the branch mainline in revision 1133.
  • Revision ID: osullivan.padraig@gmail.com-20090913010301-tcvvezipx1124acy
Added calls to the dtrace delete begin/end probes.

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
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
 
/**
31
 
 * @file Defines the API for a TransactionReader
32
 
 *
33
 
 * A command reader is a class which is able to read Transaction messages from some source
34
 
 */
35
 
 
36
 
namespace drizzled
37
 
{
38
 
namespace message { class Transaction; }
39
 
 
40
 
namespace plugin
41
 
{
42
 
 
43
 
 
44
 
/**
45
 
 * Class which can read Transaction messages from some source
46
 
 */
47
 
class TransactionReader : public Plugin
48
 
{
49
 
  TransactionReader();
50
 
  TransactionReader(const TransactionReader &);
51
 
  TransactionReader& operator=(const TransactionReader &);
52
 
public:
53
 
  explicit TransactionReader(std::string name_arg)
54
 
   : Plugin(name_arg, "TransactionReader") {}
55
 
  virtual ~TransactionReader() {}
56
 
  /**
57
 
   * Read and fill a Transaction message with the supplied
58
 
   * Transaction message global transaction ID.
59
 
   *
60
 
   * @param Global transaction ID to find
61
 
   * @param Pointer to a command message to fill
62
 
   *
63
 
   * @retval
64
 
   *  true if Transaction message was read successfully and the supplied pointer
65
 
   *  to message was filled
66
 
   * @retval
67
 
   *  false if not found or read successfully
68
 
   */
69
 
  virtual bool read(const ReplicationServices::GlobalTransactionId &to_read, 
70
 
                    message::Transaction *to_fill)= 0;
71
 
};
72
 
 
73
 
} /* end namespace plugin */
74
 
} /* end namespace drizzled */
75
 
 
76
 
#endif /* DRIZZLED_PLUGIN_TRANSACTION_READER_H */