1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,44 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-namespace Illuminate\Contracts\Cache; |
|
4 |
- |
|
5 |
-interface Lock |
|
6 |
-{ |
|
7 |
- /** |
|
8 |
- * Attempt to acquire the lock. |
|
9 |
- * |
|
10 |
- * @param callable|null $callback |
|
11 |
- * @return mixed |
|
12 |
- */ |
|
13 |
- public function get($callback = null); |
|
14 |
- |
|
15 |
- /** |
|
16 |
- * Attempt to acquire the lock for the given number of seconds. |
|
17 |
- * |
|
18 |
- * @param int $seconds |
|
19 |
- * @param callable|null $callback |
|
20 |
- * @return bool |
|
21 |
- */ |
|
22 |
- public function block($seconds, $callback = null); |
|
23 |
- |
|
24 |
- /** |
|
25 |
- * Release the lock. |
|
26 |
- * |
|
27 |
- * @return void |
|
28 |
- */ |
|
29 |
- public function release(); |
|
30 |
- |
|
31 |
- /** |
|
32 |
- * Returns the current owner of the lock. |
|
33 |
- * |
|
34 |
- * @return string |
|
35 |
- */ |
|
36 |
- public function owner(); |
|
37 |
- |
|
38 |
- /** |
|
39 |
- * Releases this lock in disregard of ownership. |
|
40 |
- * |
|
41 |
- * @return void |
|
42 |
- */ |
|
43 |
- public function forceRelease(); |
|
44 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,44 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace Illuminate\Contracts\Cache; |
|
4 |
+ |
|
5 |
+interface Lock |
|
6 |
+{ |
|
7 |
+ /** |
|
8 |
+ * Attempt to acquire the lock. |
|
9 |
+ * |
|
10 |
+ * @param callable|null $callback |
|
11 |
+ * @return mixed |
|
12 |
+ */ |
|
13 |
+ public function get($callback = null); |
|
14 |
+ |
|
15 |
+ /** |
|
16 |
+ * Attempt to acquire the lock for the given number of seconds. |
|
17 |
+ * |
|
18 |
+ * @param int $seconds |
|
19 |
+ * @param callable|null $callback |
|
20 |
+ * @return bool |
|
21 |
+ */ |
|
22 |
+ public function block($seconds, $callback = null); |
|
23 |
+ |
|
24 |
+ /** |
|
25 |
+ * Release the lock. |
|
26 |
+ * |
|
27 |
+ * @return void |
|
28 |
+ */ |
|
29 |
+ public function release(); |
|
30 |
+ |
|
31 |
+ /** |
|
32 |
+ * Returns the current owner of the lock. |
|
33 |
+ * |
|
34 |
+ * @return string |
|
35 |
+ */ |
|
36 |
+ public function owner(); |
|
37 |
+ |
|
38 |
+ /** |
|
39 |
+ * Releases this lock in disregard of ownership. |
|
40 |
+ * |
|
41 |
+ * @return void |
|
42 |
+ */ |
|
43 |
+ public function forceRelease(); |
|
44 |
+} |