
App::ResourceLocker - Interface for locking shared resources

use App;
$context = App->context();
$srs = $context->service("ResourceLocker"); # or ...
$srs = $context->shared_resource_set();

A ResourceLocker service represents a collection of "advisory" (or "cooperative") resource locks.

The following classes might be a part of the ResourceLocker Class Group.

A ResourceLocker service represents a collection of "advisory" (or "cooperative") resource locks. These can be used to synchronize access to and modification of shared resources such as are stored in a SharedDatastore.
* Throws: App::Exception::ResourceLocker * Since: 0.01

The constructor is inherited from App::Service.

* Signature: $resource_name = $srs->lock($resource_pool);
* Signature: $resource_name = $srs->lock($named);
* Param: $resource_pool string
* Param: resourcePool string
* Param: nonBlocking boolean
* Param: nonExclusive boolean
* Param: maxWaitTimeMS integer
* Return: $resource_name string
* Throws: App::Exception::ResourceLocker
* Since: 0.01
Sample Usage:
$context = App->context();
$srs = $context->service("ResourceLocker");
$srs->lock("shmem01");
The lock() method on a ResourceLocker is for the purposes of cooperative resource locking.
* Signature: $srs->unlock($resource_name);
* Param: $resource_name string
* Return: void
* Throws: App::Exception::ResourceLocker
* Since: 0.01
Sample Usage:
$context = App->context();
$srs = $context->service("ResourceLocker");
$srs->unlock("shmem01");

Returns 'ResourceLocker';
* Signature: $service_type = App::ResourceLocker->service_type();
* Param: void
* Return: $service_type string
* Since: 0.01
$service_type = $rlock->service_type();

* Author: Stephen Adkins <spadkins@gmail.com> * License: This is free software. It is licensed under the same terms as Perl itself.
