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
8
* Jay Pipes <joinfu@sun.com>
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; version 2 of the License.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
#ifndef DRIZZLED_PLUGIN_APPLIER_H
25
#define DRIZZLED_PLUGIN_APPLIER_H
28
* @file Defines the API for an Applier
30
* An Applier applies an event it has received from a Replicator (via
31
* a replicator's replicate() call, or it has read using a Reader's read()
35
/* some forward declarations needed */
50
* Base class for appliers of Command messages
58
* Apply something to a target.
62
* It is important to note that memory allocation for the
63
* supplied pointer is not guaranteed after the completion
64
* of this function -- meaning the caller can dispose of the
65
* supplied message. Therefore, appliers which are
66
* implementing an asynchronous replication system must copy
67
* the supplied message to their own controlled memory storage
70
* @param Command message to be replicated
72
virtual void apply(drizzled::message::Command *to_apply)= 0;
74
* An applier plugin should override this with its
75
* internal method for determining if it is active or not.
77
virtual bool isActive() {return false;}
80
} /* end namespace drizzled::plugin */
81
} /* end namespace drizzled */
83
#endif /* DRIZZLED_PLUGIN_APPLIER_H */