P5EEx-Blue-0.01

P5EEx::Blue::SharedResourceSet


NAME

P5EEx::Blue::SharedResourceSet - Interface for locking shared resources


SYNOPSIS

    use P5EEx::Blue::P5EE;
    $context = P5EEx::Blue::P5EE->context();
    $srs = $context->service("SharedResourceSet");  # or ...
    $srs = $context->shared_resource_set();


DESCRIPTION

A SharedResourceSet service represents a collection of ``advisory'' (or ``cooperative'') resource locks.


Class Group: SharedResourceSet

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


Class: P5EEx::Blue::SharedResourceSet

A SharedResourceSet 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: P5EEx::Blue::Exception::SharedResourceSet
 * Since:  0.01


Constructor Methods:

new()

The constructor is inherited from P5EEx::Blue::Service.


Public Methods:

lock()

    * 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:    P5EEx::Blue::Exception::SharedResourceSet
    * Since:     0.01
    Sample Usage:
    $context = P5EEx::Blue::P5EE->context();
    $srs = $context->service("SharedResourceSet");
    $srs->lock("shmem01");

The lock() method on a SharedResourceSet is for the purposes of cooperative resource locking.

unlock()

    * Signature: $srs->unlock($resource_name);
    * Param:     $resource_name          string
    * Return:    void
    * Throws:    P5EEx::Blue::Exception::SharedResourceSet
    * Since:     0.01
    Sample Usage:
    $context = P5EEx::Blue::P5EE->context();
    $srs = $context->service("SharedResourceSet");
    $srs->unlock("shmem01");


Protected Methods:

service_type()

Returns 'SharedResourceSet';

    * Signature: $service_type = P5EEx::Blue::SharedResourceSet->service_type();
    * Param:     void
    * Return:    $service_type  string
    * Since:     0.01
    $service_type = $widget->service_type();


ACKNOWLEDGEMENTS

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


SEE ALSO

P5EEx::Blue::Context, P5EEx::Blue::Service