MySQL 26.7.0
Source Code Documentation
mysql::csa::Transaction_provider Class Referenceabstract

Interface for all transaction providers. More...

#include <transaction_provider.h>

Inheritance diagram for mysql::csa::Transaction_provider:
[legend]

Public Types

using Common_reader_type = Relay_log_adaptive_reader
 

Public Member Functions

virtual Job_ptr next ()=0
 Get the next job. More...
 
virtual bool is_stopped () const =0
 Checks whether provider has been stopped externally or internally. More...
 
virtual void start ()=0
 Start provider (if asynchronous) More...
 
virtual void stop ()=0
 Stop provider and wake blocked reader calls. More...
 
virtual void finish ()=0
 Complete provider shutdown from the owner thread (transaction receiver). More...
 
virtual bool is_error () const =0
 Check if provider has an error. More...
 
virtual ~Transaction_provider ()=default
 Destructor. More...
 

Detailed Description

Interface for all transaction providers.

Transaction provider shall implement the following methods:

  • start - start provider in case this provider is asynchronous
  • stop - stops provider and wakes blocking reads
  • finish - completes provider shutdown from the provider owner thread
  • is_stopped - checks if stop has been requested internally or externally
  • next - blocks until next transaction is fetched or provider reaches stop conditions (is_stopped will return true) or temporarily wakes up thread requesting the next transaction

Member Typedef Documentation

◆ Common_reader_type

Constructor & Destructor Documentation

◆ ~Transaction_provider()

virtual mysql::csa::Transaction_provider::~Transaction_provider ( )
virtualdefault

Destructor.

Member Function Documentation

◆ finish()

virtual void mysql::csa::Transaction_provider::finish ( )
pure virtual

Complete provider shutdown from the owner thread (transaction receiver).

Requires stop to have been called first; otherwise it is a no-op.

Implemented in mysql::csa::Sync_transaction_provider.

◆ is_error()

virtual bool mysql::csa::Transaction_provider::is_error ( ) const
pure virtual

Check if provider has an error.

Returns
True in case an error occurred, false otherwise

Implemented in mysql::csa::Sync_transaction_provider.

◆ is_stopped()

virtual bool mysql::csa::Transaction_provider::is_stopped ( ) const
pure virtual

Checks whether provider has been stopped externally or internally.

True if stopped, false otherwise

Implemented in mysql::csa::Sync_transaction_provider.

◆ next()

virtual Job_ptr mysql::csa::Transaction_provider::next ( )
pure virtual

Get the next job.

Returns
Job smart pointer

Implemented in mysql::csa::Sync_transaction_provider.

◆ start()

virtual void mysql::csa::Transaction_provider::start ( )
pure virtual

Start provider (if asynchronous)

Implemented in mysql::csa::Sync_transaction_provider.

◆ stop()

virtual void mysql::csa::Transaction_provider::stop ( )
pure virtual

Stop provider and wake blocked reader calls.

Implemented in mysql::csa::Sync_transaction_provider.


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