1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
8
* Jay Pipes <joinfu@sun.com>
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.
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.
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
24
#ifndef DRIZZLED_PLUGIN_TRANSACTION_READER_H
25
#define DRIZZLED_PLUGIN_TRANSACTION_READER_H
27
#include "drizzled/plugin/plugin.h"
28
#include "drizzled/replication_services.h" /* For global transaction ID typedef */
30
#include "drizzled/visibility.h"
33
* @file Defines the API for a TransactionReader
35
* A command reader is a class which is able to read Transaction messages from some source
40
namespace message { class Transaction; }
47
* Class which can read Transaction messages from some source
49
class DRIZZLED_API TransactionReader : public Plugin
52
TransactionReader(const TransactionReader &);
53
TransactionReader& operator=(const TransactionReader &);
55
explicit TransactionReader(std::string name_arg)
56
: Plugin(name_arg, "TransactionReader") {}
57
virtual ~TransactionReader() {}
59
* Read and fill a Transaction message with the supplied
60
* Transaction message global transaction ID.
62
* @param Global transaction ID to find
63
* @param Pointer to a command message to fill
66
* true if Transaction message was read successfully and the supplied pointer
67
* to message was filled
69
* false if not found or read successfully
71
virtual bool read(const ReplicationServices::GlobalTransactionId &to_read,
72
message::Transaction *to_fill)= 0;
75
} /* end namespace plugin */
76
} /* end namespace drizzled */
78
#endif /* DRIZZLED_PLUGIN_TRANSACTION_READER_H */