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
5
* Copyright (c) 2010 Jay Pipes <jaypipes@gmail.com>
9
* Jay Pipes <jaypipes@gmail.com.com>
11
* This program is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2 of the License, or
14
* (at your option) any later version.
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
21
* You should have received a copy of the GNU General Public License
22
* along with this program; if not, write to the Free Software
23
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
* Defines the API of the transaction log applier.
31
* @see drizzled/plugin/replicator.h
32
* @see drizzled/plugin/applier.h
35
#ifndef PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_APPLIER_H
36
#define PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_APPLIER_H
38
#include <drizzled/replication_services.h>
39
#include <drizzled/plugin/transaction_applier.h>
41
#include "transaction_log_entry.h"
48
class TransactionLogApplier: public drizzled::plugin::TransactionApplier
51
TransactionLogApplier(const std::string name_arg,
52
TransactionLog &in_transaction_log,
56
~TransactionLogApplier();
59
* Applies a Transaction to the serial log
63
* It is important to note that memory allocation for the
64
* supplied pointer is not guaranteed after the completion
65
* of this function -- meaning the caller can dispose of the
66
* supplied message. Therefore, appliers which are
67
* implementing an asynchronous replication system must copy
68
* the supplied message to their own controlled memory storage
71
* @param Transaction message to be replicated
73
void apply(const drizzled::message::Transaction &to_apply);
75
/* Don't allows these */
76
TransactionLogApplier();
77
TransactionLogApplier(const TransactionLogApplier &other);
78
TransactionLogApplier &operator=(const TransactionLogApplier &other);
79
TransactionLog &transaction_log;
80
bool do_checksum; ///< Do a CRC32 checksum when writing Transaction message to log?
83
#endif /* PLUGIN_TRANSACTION_LOG_TRANSACTION_LOG_APPLIER_H */