Merge "Add support for PHP7 random_bytes in favor of mcrypt_create_iv"
[lhc/web/wiklou.git] / includes / libs / rdbms / database / position / DBMasterPos.php
1 <?php
2
3 namespace Wikimedia\Rdbms;
4
5 /**
6 * An object representing a master or replica DB position in a replicated setup.
7 *
8 * The implementation details of this opaque type are up to the database subclass.
9 */
10 interface DBMasterPos {
11 /**
12 * @return float UNIX timestamp
13 * @since 1.25
14 */
15 public function asOfTime();
16
17 /**
18 * @param DBMasterPos $pos
19 * @return bool Whether this position is at or higher than $pos
20 * @since 1.27
21 */
22 public function hasReached( DBMasterPos $pos );
23
24 /**
25 * @param DBMasterPos $pos
26 * @return bool Whether this position appears to be for the same channel as another
27 * @since 1.27
28 */
29 public function channelsMatch( DBMasterPos $pos );
30
31 /**
32 * @return string
33 * @since 1.27
34 */
35 public function __toString();
36 }