~drizzle-developers/ubuntu/karmic/drizzle/ppa

« back to all changes in this revision

Viewing changes to drizzled/transaction_services.h

  • Committer: Monty Taylor
  • Date: 2010-11-10 22:59:29 UTC
  • mfrom: (1308.1.27 ubuntu)
  • Revision ID: mordred@inaugust.com-20101110225929-fd7pqkg4xtuidm10
* New upstream release.
* New upstream release.
* drizzledump.1 manpage shipping in tarball now.
* Removed quilt patches for things applied upstream.
* Added support for RabbitMQ plugin.
* Added support for libnotify error message plugin.
* Added build depend on libboost-iostreams-dev.
* Karmic PPA

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
{
37
37
  class MonitoredInTransaction;
38
38
  class XaResourceManager;
 
39
  class XaStorageEngine;
39
40
  class TransactionalStorageEngine;
40
41
}
41
42
 
42
43
class Session;
43
44
class NamedSavepoint;
44
45
class Field;
45
 
 
 
46
 
46
47
/**
47
48
 * This is a class which manages the XA transaction processing
48
49
 * in the server
51
52
{
52
53
public:
53
54
  static const size_t DEFAULT_RECORD_SIZE= 100;
54
 
  typedef uint64_t TransactionId;
55
 
  /**
56
 
   * Constructor
57
 
   */
58
 
  TransactionServices()
59
 
  {
60
 
    /**
61
 
     * @todo set transaction ID to the last one from an applier...
62
 
     */
63
 
    current_transaction_id= 0;
64
 
  }
 
55
  
 
56
  TransactionServices();
65
57
 
66
58
  /**
67
59
   * Singleton method
435
427
                                      plugin::MonitoredInTransaction *monitored,
436
428
                                      plugin::TransactionalStorageEngine *engine,
437
429
                                      plugin::XaResourceManager *resource_manager);
438
 
  TransactionId getNextTransactionId()
439
 
  {
440
 
    return current_transaction_id.increment();
441
 
  }
442
 
  TransactionId getCurrentTransactionId()
443
 
  {
444
 
    return current_transaction_id;
445
 
  }
446
 
  /**
447
 
   * DEBUG ONLY.  See plugin::TransactionLog::truncate()
448
 
   */
449
 
  void resetTransactionId()
450
 
  {
451
 
    current_transaction_id= 0;
452
 
  }
453
 
 
 
430
 
 
431
  uint64_t getCurrentTransactionId(Session *session);
 
432
 
 
433
  void allocateNewTransactionId();
 
434
 
454
435
  /**************
455
436
   * Events API
456
437
   **************/
476
457
  bool sendShutdownEvent(Session *session);
477
458
 
478
459
private:
479
 
  atomic<TransactionId> current_transaction_id;
480
460
 
481
461
  /**
482
462
   * Checks if a field has been updated 
520
500
                               Table *in_table,
521
501
                               const unsigned char *old_record,
522
502
                               const unsigned char *new_record);
 
503
 
 
504
  plugin::XaStorageEngine *xa_storage_engine;
523
505
};
524
506
 
525
507
} /* namespace drizzled */