21
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
#ifndef DRIZZLED_PLUGIN_COMMAND_READER_H
25
#define DRIZZLED_PLUGIN_COMMAND_READER_H
24
#ifndef DRIZZLED_PLUGIN_TRANSACTION_READER_H
25
#define DRIZZLED_PLUGIN_TRANSACTION_READER_H
27
27
#include <drizzled/replication_services.h> /* For global transaction ID typedef */
30
* @file Defines the API for a CommandReader
30
* @file Defines the API for a TransactionReader
32
* A command reader is a class which is able to read Command messages from some source
32
* A command reader is a class which is able to read Transaction messages from some source
35
35
/* some forward declarations needed */
39
namespace message { class Transaction; }
51
* Class which can read Command messages from some source
46
* Class which can read Transaction messages from some source
48
class TransactionReader
57
virtual ~CommandReader() {}
51
TransactionReader() {}
52
virtual ~TransactionReader() {}
59
* Read and fill a Command message with the supplied
60
* Command message global transaction ID.
54
* Read and fill a Transaction message with the supplied
55
* Transaction message global transaction ID.
62
57
* @param Global transaction ID to find
63
58
* @param Pointer to a command message to fill
66
* true if Command message was read successfully and the supplied pointer
61
* true if Transaction message was read successfully and the supplied pointer
67
62
* to message was filled
69
64
* false if not found or read successfully
71
66
virtual bool read(const ReplicationServices::GlobalTransactionId &to_read,
72
message::Command *to_fill)= 0;
67
message::Transaction *to_fill)= 0;
75
70
} /* end namespace drizzled::plugin */
76
71
} /* end namespace drizzled */
78
#endif /* DRIZZLED_PLUGIN_COMMAND_READER_H */
73
#endif /* DRIZZLED_PLUGIN_TRANSACTION_READER_H */