PluginProbe
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution / trunk
Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution vtrunk
2.0.1 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.4.2 1.5.0 1.6.0 1.6.1 1.7.0 1.7.1 1.8.0 1.9.0 2.0.0
solid-performance / src / Performance / Lock / Lock_Entry.php

Lock_Entry.php in Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution trunk, at src/Performance/Lock/Lock_Entry.php

80 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The Lock Data Transfer Object that is stored and retrieved to determine
4 * lock state.
5 *
6 * @package SolidWP\Performance
7 */
8
9 declare( strict_types=1 );
10
11 namespace SolidWP\Performance\Lock;
12
13 /**
14 * The Lock Data Transfer Object that is stored and retrieved to determine
15 * lock state.
16 *
17 * @package SolidWP\Performance
18 */
19 final class Lock_Entry {
20
21 /**
22 * The unique lock name.
23 *
24 * @var string
25 */
26 private string $name;
27
28 /**
29 * The expiration in seconds.
30 *
31 * @var int
32 */
33 private int $expiration;
34
35 /**
36 * The owner of the lock.
37 *
38 * @var string
39 */
40 private string $owner;
41
42 /**
43 * @param string $name The unique lock name.
44 * @param int $expiration The expiration in seconds.
45 * @param string $owner The owner of the lock.
46 */
47 public function __construct( string $name, int $expiration, string $owner ) {
48 $this->name = $name;
49 $this->expiration = $expiration;
50 $this->owner = $owner;
51 }
52
53 /**
54 * Get the lock name.
55 *
56 * @return string
57 */
58 public function name(): string {
59 return $this->name;
60 }
61
62 /**
63 * Get the lock expiration in seconds.
64 *
65 * @return int
66 */
67 public function expiration(): int {
68 return $this->expiration;
69 }
70
71 /**
72 * Get the lock owner.
73 *
74 * @return string
75 */
76 public function owner(): string {
77 return $this->owner;
78 }
79 }
80