NAME
Flux::Storage::Role::ClientList - common methods for storages with named clients
VERSION
version 1.03
SYNOPSIS
@client_names = $storage->client_names;
$in = $storage->stream($client_name);
$storage->register_client($client_name);
$storage->unregister_client($client_name);
$storage->has_client($client_name);
DESRIPTION
Some storages are able to generate stream by client's name. This role guarantees that storage implements some common methods for listing and registering storage clients.
METHODS
- client_names()
-
Get all storage client names as a plain list.
- register_client($name)
-
Register a new client in the storage.
Default implementation does nothing.
- unregister_client($name)
-
Unregister a client from the storage.
Default implementation does nothing.
- has_client($name)
-
Check whether the storage has a client with given name.
Default implementation uses
client_names()
, but you can override it for the sake of performance.
AUTHOR
Vyacheslav Matyukhin <me@berekuk.ru>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Yandex LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.