Drizzled Public API Documentation

drizzled::ReplicationServices Class Reference

#include <replication_services.h>

Public Types

enum  MessageType { TRANSACTION = 1, BLOB = 2 }
typedef uint64_t GlobalTransactionId
typedef std::pair
< plugin::TransactionReplicator
*, plugin::TransactionApplier * > 
ReplicationPair
typedef std::vector
< ReplicationPair > 
ReplicationStreams

Static Public Member Functions

static bool evaluateRegisteredPlugins ()
static
plugin::ReplicationReturnCode 
pushTransactionMessage (Session &in_session, message::Transaction &to_push)
static bool isActive ()
static ReplicationStreams & getReplicationStreams ()
static void attachReplicator (plugin::TransactionReplicator *in_replicator)
static void detachReplicator (plugin::TransactionReplicator *in_replicator)
static void attachApplier (plugin::TransactionApplier *in_applier, const std::string &requested_replicator)
static void detachApplier (plugin::TransactionApplier *in_applier)
static uint64_t getLastAppliedTimestamp ()

Detailed Description

This is a class which manages transforming internal transactional events into GPB messages and sending those events out through registered replicators and appliers.

Definition at line 46 of file replication_services.h.

Member Enumeration Documentation

Types of messages that can go in the transaction log file. Every time something is written into the transaction log, it is preceded by a header containing the type of message which follows.

Definition at line 56 of file replication_services.h.

Member Function Documentation

void drizzled::ReplicationServices::attachApplier ( plugin::TransactionApplier in_applier,
const std::string &  requested_replicator 
)
static

Attaches a applier to our internal collection of appliers.

Parameters
Pointerto a applier to attach/register
Thename of the replicator to pair with

Definition at line 165 of file replication_services.cc.

References drizzled::appliers.

void drizzled::ReplicationServices::attachReplicator ( plugin::TransactionReplicator in_replicator)
static

Attaches a replicator to our internal collection of replicators.

Parameters
Pointerto a replicator to attach/register

Definition at line 155 of file replication_services.cc.

References drizzled::replicators.

void drizzled::ReplicationServices::detachApplier ( plugin::TransactionApplier in_applier)
static

Detaches/unregisters a applier with our internal collection of appliers.

Parameters
Pointerto the applier to detach

Definition at line 170 of file replication_services.cc.

void drizzled::ReplicationServices::detachReplicator ( plugin::TransactionReplicator in_replicator)
static

Detaches/unregisters a replicator with our internal collection of replicators.

Parameters
Pointerto the replicator to detach

Definition at line 160 of file replication_services.cc.

References drizzled::replicators.

bool drizzled::ReplicationServices::evaluateRegisteredPlugins ( )
static

Method which is called after plugins have been loaded but before the first client connects. It determines if the registration of applier and replicator plugins is proper and pairs the applier and requested replicator plugins into the replication streams.

Todo:

This is only necessary because we don't yet have plugin dependency tracking...

Definition at line 94 of file replication_services.cc.

References drizzled::appliers, drizzled::is_active, drizzled::normalizeReplicatorName(), drizzled::replication_streams, and drizzled::replicators.

static uint64_t drizzled::ReplicationServices::getLastAppliedTimestamp ( )
static

Returns the timestamp of the last Transaction which was sent to an applier.

ReplicationServices::ReplicationStreams & drizzled::ReplicationServices::getReplicationStreams ( )
static

Returns the list of replication streams

Definition at line 207 of file replication_services.cc.

References drizzled::replication_streams.

bool drizzled::ReplicationServices::isActive ( )
static

Returns whether the ReplicationServices object is active. In other words, does it have both a replicator and an applier that are active?

Definition at line 174 of file replication_services.cc.

References drizzled::is_active.

plugin::ReplicationReturnCode drizzled::ReplicationServices::pushTransactionMessage ( Session in_session,
message::Transaction to_push 
)
static

Helper method which pushes a constructed message out to the registered replicator and applier plugins.

Parameters
Sessiondescriptor
Messageto push out

Definition at line 179 of file replication_services.cc.

References drizzled::last_applied_timestamp, drizzled::plugin::TransactionReplicator::replicate(), and drizzled::replication_streams.


The documentation for this class was generated from the following files: