3 namespace Wikimedia\Rdbms
;
8 * An object representing a primary or replica DB position in a replicated setup.
10 * The implementation details of this opaque type are up to the database subclass.
14 interface DBPrimaryPos
extends Stringable
{
17 * @return float UNIX timestamp
19 public function asOfTime();
23 * @param DBPrimaryPos $pos
24 * @return bool Whether this position is at or higher than $pos
26 public function hasReached( DBPrimaryPos
$pos );
32 public function __toString();
35 * Deserialization from storage
38 * @param array $data Representation as returned from ::toArray()
39 * @return DBPrimaryPos
41 public static function newFromArray( array $data );
44 * Serialization for storage
47 * @return array Representation for use by ::newFromArray()
49 public function toArray(): array;