1039.5.1
by Jay Pipes
* New serial event log plugin |
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
|
|
5 |
*
|
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; either version 2 of the License, or
|
|
9 |
* (at your option) any later version.
|
|
10 |
*
|
|
11 |
* This program is distributed in the hope that it will be useful,
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU General Public License
|
|
17 |
* along with this program; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
21 |
/**
|
|
22 |
* @file
|
|
23 |
*
|
|
1039.5.2
by Jay Pipes
Fixed up some comments and include guard in plugin/default_replicator/default_replicator.h |
24 |
* Defines the API of the default replicator.
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
25 |
*
|
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
26 |
* @see drizzled/plugin/transaction_replicator.h
|
27 |
* @see drizzled/plugin/transaction_applier.h
|
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
28 |
*/
|
29 |
||
1122.2.10
by Monty Taylor
Fixed all of the include guards. |
30 |
#ifndef PLUGIN_DEFAULT_REPLICATOR_DEFAULT_REPLICATOR_H
|
31 |
#define PLUGIN_DEFAULT_REPLICATOR_DEFAULT_REPLICATOR_H
|
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
32 |
|
33 |
#include <drizzled/atomics.h> |
|
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
34 |
#include <drizzled/plugin/transaction_replicator.h> |
1039.5.1
by Jay Pipes
* New serial event log plugin |
35 |
|
36 |
#include <vector> |
|
37 |
#include <string> |
|
38 |
||
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
39 |
class DefaultReplicator: public drizzled::plugin::TransactionReplicator |
1039.5.1
by Jay Pipes
* New serial event log plugin |
40 |
{
|
41 |
public: |
|
1130.2.6
by Monty Taylor
Merged in latest plugin-slot-reorg. |
42 |
explicit DefaultReplicator(std::string name_arg) |
1143.2.18
by Jay Pipes
Merge trunk and resolve conflicts. |
43 |
: drizzled::plugin::TransactionReplicator(name_arg) {} |
1039.5.1
by Jay Pipes
* New serial event log plugin |
44 |
|
45 |
/** Destructor */
|
|
46 |
~DefaultReplicator() {} |
|
1130.2.27
by Monty Taylor
Fixed merge omission in DefaultReplicator (thanks Jay!) |
47 |
|
48 |
/**
|
|
49 |
* Returns whether the replicator is active
|
|
50 |
*/
|
|
1130.2.29
by Monty Taylor
Removed runtime active flag from plugin::Plugin. Put a runtime enabled flag on CommandApplier and CommandReplicator - we can refactor this down into plugin::Plugin later if we need to. |
51 |
virtual bool isEnabled() const; |
1130.2.27
by Monty Taylor
Fixed merge omission in DefaultReplicator (thanks Jay!) |
52 |
|
1130.2.29
by Monty Taylor
Removed runtime active flag from plugin::Plugin. Put a runtime enabled flag on CommandApplier and CommandReplicator - we can refactor this down into plugin::Plugin later if we need to. |
53 |
virtual void enable(); |
54 |
virtual void disable(); |
|
1130.2.27
by Monty Taylor
Fixed merge omission in DefaultReplicator (thanks Jay!) |
55 |
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
56 |
/**
|
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
57 |
* Replicate a Transaction message to an Applier.
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
58 |
*
|
59 |
* @note
|
|
60 |
*
|
|
61 |
* It is important to note that memory allocation for the
|
|
62 |
* supplied pointer is not guaranteed after the completion
|
|
63 |
* of this function -- meaning the caller can dispose of the
|
|
64 |
* supplied message. Therefore, replicators and appliers
|
|
65 |
* implementing an asynchronous replication system must copy
|
|
66 |
* the supplied message to their own controlled memory storage
|
|
67 |
* area.
|
|
68 |
*
|
|
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
69 |
* @param Transaction message to be replicated
|
1039.5.1
by Jay Pipes
* New serial event log plugin |
70 |
*/
|
1143.2.10
by Jay Pipes
Phase 2 new replication work: |
71 |
void replicate(drizzled::plugin::TransactionApplier *in_applier, drizzled::message::Transaction &to_replicate); |
1039.5.1
by Jay Pipes
* New serial event log plugin |
72 |
|
73 |
};
|
|
74 |
||
1122.2.10
by Monty Taylor
Fixed all of the include guards. |
75 |
#endif /* PLUGIN_DEFAULT_REPLICATOR_DEFAULT_REPLICATOR_H */ |