DBMasterPos.php 802 B

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