~jaypipes/drizzle/split-xa-resource-manager

« back to all changes in this revision

Viewing changes to drizzled/replication_services.h

  • Committer: Jay Pipes
  • Date: 2010-02-06 01:51:20 UTC
  • mfrom: (1273.1.10 build)
  • Revision ID: jpipes@serialcoder-20100206015120-as4vb638inbzrb59
Merge trunk changes and resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#include <vector>
32
32
 
 
33
 
 
34
namespace drizzled
 
35
{
 
36
 
33
37
/* some forward declarations needed */
34
38
class Session;
35
39
class Table;
36
40
 
37
 
namespace drizzled
 
41
namespace plugin
38
42
{
39
 
  namespace plugin
40
 
  {
41
 
    class TransactionReplicator;
42
 
    class TransactionApplier;
43
 
  }
 
43
  class TransactionReplicator;
 
44
  class TransactionApplier;
 
45
}
44
46
 
45
47
/**
46
48
 * This is a class which manages transforming internal 
95
97
   *
96
98
   * @param The session processing the transaction
97
99
   */
98
 
  drizzled::message::Transaction *getActiveTransaction(Session *in_session) const;
 
100
  message::Transaction *getActiveTransaction(Session *in_session) const;
99
101
  /** 
100
102
   * Helper method which attaches a transaction context
101
103
   * the supplied transaction based on the supplied Session's
105
107
   * @param The transaction message to initialize
106
108
   * @param The Session processing this transaction
107
109
   */
108
 
  void initTransaction(drizzled::message::Transaction &in_command, Session *in_session) const;
 
110
  void initTransaction(message::Transaction &in_command, Session *in_session) const;
109
111
  /** 
110
112
   * Helper method which finalizes data members for the 
111
113
   * supplied transaction's context.
113
115
   * @param The transaction message to finalize 
114
116
   * @param The Session processing this transaction
115
117
   */
116
 
  void finalizeTransaction(drizzled::message::Transaction &in_command, Session *in_session) const;
 
118
  void finalizeTransaction(message::Transaction &in_command, Session *in_session) const;
117
119
  /**
118
120
   * Helper method which deletes transaction memory and
119
121
   * unsets Session's transaction and statement messages.
127
129
   *
128
130
   * @param The transaction to check
129
131
   */
130
 
  bool transactionContainsBulkSegment(const drizzled::message::Transaction &transaction) const;
 
132
  bool transactionContainsBulkSegment(const message::Transaction &transaction) const;
131
133
  /**
132
134
   * Helper method which initializes a Statement message
133
135
   *
135
137
   * @param The type of the statement
136
138
   * @param The session processing this statement
137
139
   */
138
 
  void initStatement(drizzled::message::Statement &statement,
139
 
                     drizzled::message::Statement::Type in_type,
 
140
  void initStatement(message::Statement &statement,
 
141
                     message::Statement::Type in_type,
140
142
                     Session *in_session) const;
141
143
  /**
142
144
   * Helper method which returns an initialized Statement
214
216
   *
215
217
   * @param Message to push out
216
218
   */
217
 
  void push(drizzled::message::Transaction &to_push);
 
219
  void push(message::Transaction &to_push);
218
220
public:
219
221
  /**
220
222
   * Constructor
243
245
   *
244
246
   * @param Pointer to a replicator to attach/register
245
247
   */
246
 
  void attachReplicator(drizzled::plugin::TransactionReplicator *in_replicator);
 
248
  void attachReplicator(plugin::TransactionReplicator *in_replicator);
247
249
  /**
248
250
   * Detaches/unregisters a replicator with our internal
249
251
   * collection of replicators.
250
252
   *
251
253
   * @param Pointer to the replicator to detach
252
254
   */
253
 
  void detachReplicator(drizzled::plugin::TransactionReplicator *in_replicator);
 
255
  void detachReplicator(plugin::TransactionReplicator *in_replicator);
254
256
  /**
255
257
   * Attaches a applier to our internal collection of
256
258
   * appliers.
257
259
   *
258
260
   * @param Pointer to a applier to attach/register
259
261
   */
260
 
  void attachApplier(drizzled::plugin::TransactionApplier *in_applier);
 
262
  void attachApplier(plugin::TransactionApplier *in_applier);
261
263
  /**
262
264
   * Detaches/unregisters a applier with our internal
263
265
   * collection of appliers.
264
266
   *
265
267
   * @param Pointer to the applier to detach
266
268
   */
267
 
  void detachApplier(drizzled::plugin::TransactionApplier *in_applier);
 
269
  void detachApplier(plugin::TransactionApplier *in_applier);
268
270
  /**
269
271
   * Commits a normal transaction (see above) and pushes the
270
272
   * transaction message out to the replicators.
286
288
   * @param The statement to initialize
287
289
   * @param The session processing this statement
288
290
   */
289
 
  void finalizeStatement(drizzled::message::Statement &statement,
 
291
  void finalizeStatement(message::Statement &statement,
290
292
                         Session *in_session) const;
291
293
  /**
292
294
   * Creates a new InsertRecord GPB message and pushes it to
350
352
  uint64_t getLastAppliedTimestamp() const;
351
353
};
352
354
 
353
 
} /* end namespace drizzled */
 
355
} /* namespace drizzled */
354
356
 
355
357
#endif /* DRIZZLED_REPLICATION_SERVICES_H */