~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/transaction_log_reader.h

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
/**
26
26
 * @file
27
27
 *
28
 
 * Defines the API of a simple reader of Command messages from the
29
 
 * Command log file.  
 
28
 * Defines the API of a simple reader of Transaction messages from the
 
29
 * Transaction log file.  
30
30
 *
31
31
 * @details
32
32
 *
33
33
 * This class is used by other plugins, for instance
34
 
 * the async_replication module, in order to read the command log and
35
 
 * return Command messages.
 
34
 * the async_replication module, in order to read the transaction log and
 
35
 * return Transaction messages.
36
36
 */
37
37
 
38
 
#ifndef PLUGIN_COMMAND_LOG_COMMAND_LOG_READER_H
39
 
#define PLUGIN_COMMAND_LOG_COMMAND_LOG_READER_H
40
 
 
41
 
#include "command_log.h"
42
 
 
43
 
#include <drizzled/plugin/command_reader.h>
 
38
#ifndef PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_READER_H
 
39
#define PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_READER_H
 
40
 
 
41
#include "transaction_log.h"
 
42
 
 
43
#include <drizzled/plugin/transaction_reader.h>
44
44
 
45
45
/**
46
 
 * A class which reads Command messages from the Command log file
 
46
 * A class which reads Transaction messages from the Transaction log file
47
47
 */
48
 
class CommandLogReader :public drizzled::plugin::CommandReader
 
48
class TransactionLogReader :public drizzled::plugin::TransactionReader
49
49
{
50
50
private:
51
 
  /** The Command log object this reader uses */
52
 
  const CommandLog &log;
 
51
  /** The Transaction log object this reader uses */
 
52
  const TransactionLog &log;
53
53
public:
54
 
  CommandLogReader(std::string name_arg, const CommandLog &in_log)
55
 
    : drizzled::plugin::CommandReader(name_arg), log(in_log)
 
54
  TransactionLogReader(std::string name_arg, const TransactionLog &in_log)
 
55
    : drizzled::plugin::TransactionReader(name_arg), log(in_log)
56
56
  {}
57
57
 
58
58
  /** Destructor */
59
 
  ~CommandLogReader() {}
 
59
  ~TransactionLogReader() {}
60
60
  /**
61
 
   * Read and fill a Command message with the supplied
62
 
   * Command message global transaction ID.
 
61
   * Read and fill a Transaction message with the supplied
 
62
   * Transaction message global transaction ID.
63
63
   *
64
64
   * @param[in] Global transaction ID to find
65
 
   * @param[out] Pointer to a command message to fill
 
65
   * @param[out] Pointer to a transaction message to fill
66
66
   *
67
67
   * @retval
68
 
   *  true if Command message was read successfully and the supplied pointer to message was filled
 
68
   *  true if Transaction message was read successfully and the supplied pointer to message was filled
69
69
   * @retval
70
70
   *  false if not found or read successfully
71
71
   */
72
72
  bool read(const drizzled::ReplicationServices::GlobalTransactionId &to_read_trx_id, 
73
 
            drizzled::message::Command *to_fill);
 
73
            drizzled::message::Transaction *to_fill);
74
74
};
75
75
 
76
 
#endif /* PLUGIN_COMMAND_LOG_COMMAND_LOG_READER_H */
 
76
#endif /* PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_READER_H */