2016-09-14 10:11:41 +00:00
|
|
|
<?php
|
2017-02-08 06:48:30 +00:00
|
|
|
|
|
|
|
|
namespace Wikimedia\Rdbms;
|
|
|
|
|
|
2018-02-23 03:23:19 +00:00
|
|
|
use Serializable;
|
|
|
|
|
|
2016-09-14 10:11:41 +00:00
|
|
|
/**
|
|
|
|
|
* An object representing a master or replica DB position in a replicated setup.
|
|
|
|
|
*
|
|
|
|
|
* The implementation details of this opaque type are up to the database subclass.
|
|
|
|
|
*/
|
2018-02-23 03:23:19 +00:00
|
|
|
interface DBMasterPos extends Serializable {
|
2016-09-14 10:11:41 +00:00
|
|
|
/**
|
|
|
|
|
* @return float UNIX timestamp
|
|
|
|
|
* @since 1.25
|
|
|
|
|
*/
|
|
|
|
|
public function asOfTime();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param DBMasterPos $pos
|
|
|
|
|
* @return bool Whether this position is at or higher than $pos
|
|
|
|
|
* @since 1.27
|
|
|
|
|
*/
|
|
|
|
|
public function hasReached( DBMasterPos $pos );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param DBMasterPos $pos
|
|
|
|
|
* @return bool Whether this position appears to be for the same channel as another
|
|
|
|
|
* @since 1.27
|
|
|
|
|
*/
|
|
|
|
|
public function channelsMatch( DBMasterPos $pos );
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
* @since 1.27
|
|
|
|
|
*/
|
|
|
|
|
public function __toString();
|
|
|
|
|
}
|