function ZookeeperStore::exists
Overrides PersistingStoreInterface::exists
2 calls to ZookeeperStore::exists()
- ZookeeperStore::delete in vendor/
symfony/ lock/ Store/ ZookeeperStore.php - Removes a resource from the storage.
- ZookeeperStore::save in vendor/
symfony/ lock/ Store/ ZookeeperStore.php - Stores the resource if it's not locked by someone else.
File
-
vendor/
symfony/ lock/ Store/ ZookeeperStore.php, line 87
Class
- ZookeeperStore
- ZookeeperStore is a PersistingStoreInterface implementation using Zookeeper as store engine.
Namespace
Symfony\Component\Lock\StoreCode
public function exists(Key $key) : bool {
$resource = $this->getKeyResource($key);
try {
return $this->zookeeper
->get($resource) === $this->getUniqueToken($key);
} catch (\ZookeeperException) {
return false;
}
}