Blame view

public/vendor/illuminate/contracts/Cache/Lock.php 818 Bytes
86143e36f   Андрей Ларионов   Коммит вторник
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  <?php
  
  namespace Illuminate\Contracts\Cache;
  
  interface Lock
  {
      /**
       * Attempt to acquire the lock.
       *
       * @param  callable|null  $callback
       * @return mixed
       */
      public function get($callback = null);
  
      /**
       * Attempt to acquire the lock for the given number of seconds.
       *
       * @param  int  $seconds
       * @param  callable|null  $callback
       * @return bool
       */
      public function block($seconds, $callback = null);
  
      /**
       * Release the lock.
       *
       * @return bool
       */
      public function release();
  
      /**
       * Returns the current owner of the lock.
       *
       * @return string
       */
      public function owner();
  
      /**
       * Releases this lock in disregard of ownership.
       *
       * @return void
       */
      public function forceRelease();
  }