| @@ 89-96 (lines=8) @@ | ||
| 86 | * @param $key |
|
| 87 | * @throws NotExistingKeyException |
|
| 88 | */ |
|
| 89 | public function delete($key) |
|
| 90 | { |
|
| 91 | if (!$this->exists($key)) { |
|
| 92 | throw new NotExistingKeyException(sprintf('The key "%s" does not exists.', $key)); |
|
| 93 | } |
|
| 94 | ||
| 95 | $this->redis->hdel(self::LOCK_LIST_NAME, $this->getLockPath($key)); |
|
| 96 | } |
|
| 97 | ||
| 98 | /** |
|
| 99 | * @param $key |
|
| @@ 112-119 (lines=8) @@ | ||
| 109 | * @return mixed |
|
| 110 | * @throws NotExistingKeyException |
|
| 111 | */ |
|
| 112 | public function get($key) |
|
| 113 | { |
|
| 114 | if (!$this->exists($key)) { |
|
| 115 | throw new NotExistingKeyException(sprintf('The key "%s" does not exists.', $key)); |
|
| 116 | } |
|
| 117 | ||
| 118 | return unserialize($this->redis->hget(self::LOCK_LIST_NAME, $this->getLockPath($key))); |
|
| 119 | } |
|
| 120 | ||
| 121 | /** |
|
| 122 | * @return array |
|