~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/command_log/command_log.h

  • Committer: Brian Aker
  • Date: 2009-10-12 22:46:41 UTC
  • mfrom: (1130.2.27 plugin-base-class)
  • Revision ID: brian@gaz-20091012224641-gjo56i190y8c98xg
Merge Monty, default class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
private:
61
61
  int log_file; /**< Handle for our log file */
62
62
  enum status state; /**< The state the log is in */
63
 
  drizzled::atomic<bool> is_enabled; /**< Internal toggle. Atomic to support online toggling of command log... */
64
 
  drizzled::atomic<bool> is_active; /**< Internal toggle. If true, log was initialized properly... */
65
63
  drizzled::atomic<bool> do_checksum; ///< Do a CRC32 checksum when writing Command message to log?
66
64
  const char *log_file_path; /**< Full path to the log file */
67
65
  drizzled::atomic<off_t> log_offset; /**< Offset in log file where log will write next command */
68
66
public:
69
 
  CommandLog(const char *in_log_file_path, bool in_do_checksum);
 
67
  CommandLog(std::string name_arg,
 
68
             const char *in_log_file_path, bool in_do_checksum);
70
69
 
71
70
  /** Destructor */
72
71
  ~CommandLog();
88
87
   */
89
88
  void apply(const drizzled::message::Command &to_apply);
90
89
  
91
 
  /** 
92
 
   * Returns whether the command log is active.
93
 
   */
94
 
  bool isActive();
95
 
 
96
 
  /**
97
 
   * Disables the plugin.
98
 
   * Disabled just means that the user has done an online set @command_log_enable= false
99
 
   */
100
 
  inline void disable()
101
 
  {
102
 
    is_enabled= false;
103
 
  }
104
 
 
105
 
  /**
106
 
   * Enables the plugin.  Enabling is a bit different from isActive().
107
 
   * Enabled just means that the user has done an online set global command_log_enable= true
108
 
   * or has manually started up the server with --command-log-enable
109
 
   */
110
 
  inline void enable()
111
 
  {
112
 
    is_enabled= true;
113
 
  }
114
 
 
115
90
  /**
116
91
   * Returns the state that the log is in
117
92
   */