diff options
Diffstat (limited to 'www/wiki/includes/libs/rdbms/database/position/DBMasterPos.php')
-rw-r--r-- | www/wiki/includes/libs/rdbms/database/position/DBMasterPos.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/www/wiki/includes/libs/rdbms/database/position/DBMasterPos.php b/www/wiki/includes/libs/rdbms/database/position/DBMasterPos.php new file mode 100644 index 00000000..28d2a1b8 --- /dev/null +++ b/www/wiki/includes/libs/rdbms/database/position/DBMasterPos.php @@ -0,0 +1,38 @@ +<?php + +namespace Wikimedia\Rdbms; + +use Serializable; + +/** + * 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. + */ +interface DBMasterPos extends Serializable { + /** + * @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(); +} |