LockProvider.php 565 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Illuminate\Contracts\Cache;
  3. interface LockProvider
  4. {
  5. /**
  6. * Get a lock instance.
  7. *
  8. * @param string $name
  9. * @param int $seconds
  10. * @param string|null $owner
  11. * @return \Illuminate\Contracts\Cache\Lock
  12. */
  13. public function lock($name, $seconds = 0, $owner = null);
  14. /**
  15. * Restore a lock instance using the owner identifier.
  16. *
  17. * @param string $name
  18. * @param string $owner
  19. * @return \Illuminate\Contracts\Cache\Lock
  20. */
  21. public function restoreLock($name, $owner);
  22. }