P5EEx-Blue-0.01

P5EEx::Blue::SharedDatastore


NAME

P5EEx::Blue::SharedDatastore - Interface for sharing data between processes


SYNOPSIS

    use P5EEx::Blue::P5EE;
    $context = P5EEx::Blue::P5EE->context();
    $sds = $context->service("SharedDatastore");
    $sds = $context->shared_datastore();


DESCRIPTION

A SharedDatastore service represents a single hash in which scalars or deep references may be stored (basically an MLDBM).


Class Group: SharedDatastore

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


Class: P5EEx::Blue::SharedDatastore

A SharedDatastore service represents a single hash in which scalars or deep references may be stored. (They are automatically serialized for storage.)

It is essentially identical to an MLDBM, but it supports more implementations than an MLDBM (MLDBM is one of the implementations). It also does not support the ``tie'' interface.

 * Throws: P5EEx::Blue::Exception::SharedDatastore
 * Since:  0.01


Constructor Methods:

new()

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


Public Methods:

get()

    * Signature: $value = $sds->get($key);
    * Param:     $key               string
    * Return:    $value             anything
    * Throws:    P5EEx::Blue::Exception::SharedDatastore
    * Since:     0.01
    Sample Usage:
    $context = P5EEx::Blue::P5EE->context();
    $sds = $context->service("SharedDatastore");
    $hash = $sds->get("user.spadkins");
    print %$hash, "\n";

free()

    * Signature: $sds->free($key);
    * Param:     $key               string
    * Return:    void
    * Throws:    P5EEx::Blue::Exception::SharedDatastore
    * Since:     0.01
    Sample Usage:
    $context = P5EEx::Blue::P5EE->context();
    $sds = $context->service("SharedDatastore");
    $hash = $sds->get("user.spadkins");
    print %$hash, "\n";
    $sds->free("user.spadkins");  # indicate that others may modify it

set()

    * Signature: $value = $sds->set($key,$value);
    * Param:     $key               string
    * Param:     $value             anything
    * Return:    void
    * Throws:    P5EEx::Blue::Exception::SharedDatastore
    * Since:     0.01
    Sample Usage:
    $context = P5EEx::Blue::P5EE->context();
    $sds = $context->service("SharedDatastore");
    $hash = $sds->set("user.spadkins");
    print %$hash, "\n";


Protected Methods:

service_type()

Returns 'SharedDatastore';

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

serialize()

    * Signature: $blob = $self->serialize($ref);
    * Param:     $ref           any
    * Return:    $blob          scalar
    * Since:     0.01
    $blob = $self->serialize($ref);


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