Lock.php 563B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Illuminate\Contracts\Cache;
  3. interface Lock
  4. {
  5. /**
  6. * Attempt to acquire the lock.
  7. *
  8. * @param callable|null $callback
  9. * @return bool
  10. */
  11. public function get($callback = null);
  12. /**
  13. * Attempt to acquire the lock for the given number of seconds.
  14. *
  15. * @param int $seconds
  16. * @param callable|null $callback
  17. * @return bool
  18. */
  19. public function block($seconds, $callback = null);
  20. /**
  21. * Release the lock.
  22. *
  23. * @return void
  24. */
  25. public function release();
  26. }