mco_translog_play_stop

This function provides the ability to stop one instance of transaction logging without affecting other instances of transaction logging (in this context, a "transaction logging instance" refers to a thread which calls mco_translog_play()).

For an overview see page TL Applications

Prototype

    MCO_RET mco_translog_play_stop ( mco_db_h db );

Arguments

db
A database connection handle that was passed to the corresponding mco_translog_iterate() or mco_translog_play().

Description

This function allows interrupting a currently executing mco_translog_iterate() call that is iterating over a pipe. It is implemented internally by placing a marker into the pipe that indicates that the replay must be stopped immediately even if the pipe is not updated from the database side (i.e., database transactions are not written into the pipe at the moment). Once mco_translog_play() is stopped, the next call to mco_translog_iterate() or mco_translog_play() returns MCO_E_TL_PLAY_STOPPED.

(Note that an equivalent to mco_translog_play_stop() is not currently available through the JNI or C# API.)

Return Codes

MCO_S_OK
The marker was set; the next call to mco_translog_play() returns MCO_E_TL_PLAY_STOPPED.
MCO_E_TL_PLAY_NOT_STARTED
mco_translog_play_stop() has been called prior to calling mco_translog_iterate() (the pipe has not been read yet).
MCO_E_TL_NOT_STARTED
The transaction logging process has not been started (mco_translog_start() has not been called yet).

Files

Header file:
mcolog.h
Source file:
mcolog.c
Library:
libmcolog.a