drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
transaction_applier.h
1/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3 *
4 * Copyright (C) 2008-2009 Sun Microsystems, Inc.
5 * Copyright (C) 2010 Jay Pipes
6 *
7 * Authors:
8 *
9 * Jay Pipes <[email protected]>
10 *
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; version 2 of the License.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 */
24
25#pragma once
26
34
35#include <drizzled/plugin/plugin.h>
36#include <drizzled/plugin/replication.h>
37
38#include <drizzled/visibility.h>
39
40namespace drizzled {
41namespace plugin {
42
46class DRIZZLED_API TransactionApplier : public Plugin
47{
48public:
49 explicit TransactionApplier(std::string name_arg)
50 : Plugin(name_arg, "TransactionApplier")
51 {
52 }
68 virtual ReplicationReturnCode apply(Session &in_session,
69 const message::Transaction &to_apply)= 0;
70
71 static bool addPlugin(TransactionApplier &applier);
72 static void removePlugin(TransactionApplier &applier);
73};
74
75} /* namespace plugin */
76} /* namespace drizzled */
77
virtual ReplicationReturnCode apply(Session &in_session, const message::Transaction &to_apply)=0
TODO: Rename this file - func.h is stupid.
Visibility Control Macros.
#define DRIZZLED_API
Definition visibility.h:38