class ZookeeperStore implements StoreInterface

ZookeeperStore is a StoreInterface implementation using Zookeeper as store engine.

Methods

__construct(Zookeeper $zookeeper)

No description

save(Key $key)

Stores the resource if it's not locked by someone else.

delete(Key $key)

Removes a resource from the storage.

bool
exists(Key $key)

Returns whether or not the resource exists in the storage.

waitAndSave(Key $key)

Waits until a key becomes free, then stores the resource.

putOffExpiration(Key $key, $ttl)

Extends the ttl of a resource.

Details

__construct(Zookeeper $zookeeper)

Parameters

Zookeeper $zookeeper

save(Key $key)

Stores the resource if it's not locked by someone else.

delete(Key $key)

Removes a resource from the storage.

Parameters

Key $key

Exceptions

LockReleasingException

bool exists(Key $key)

Returns whether or not the resource exists in the storage.

Parameters

Key $key

Return Value

bool

waitAndSave(Key $key)

Waits until a key becomes free, then stores the resource.

If the store does not support this feature it should throw a NotSupportedException.

putOffExpiration(Key $key, $ttl)

Extends the ttl of a resource.

If the store does not support this feature it should throw a NotSupportedException.

Parameters

Key $key
$ttl

Exceptions

LockConflictedException
NotSupportedException