| App-Context documentation | view source | Contained in the App-Context distribution. |
App::SharedDatastore - Interface for sharing data between processes
use App;
$context = App->context();
$sds = $context->service("SharedDatastore");
$sds = $context->shared_datastore();
A SharedDatastore service represents a single hash in which scalars or deep references may be stored (basically an MLDBM).
The constructor is inherited from
App::Service|App::Service/"new()".
* Signature: $sds->set($key, $value);
* Signature: $sds->set($key, $value, $options);
* Param: $key scalar
* Param: $value scalar
* Param: $options HASH (optional)
* Return: void
$sds->set($key,$value);
$options = {
info_columns => [ "col1", "col2" ],
info_values => [ "value1", "value2" ],
};
$sds->set($key, $value, $options);
* Signature: $value = $sds->get($key);
* Param: $key scalar
* Return: $value scalar
$value = $sds->get($key);
* Signature: $sds->set_ref($keyref,$valueref);
* Signature: $sds->set_ref($keyref,$valueref,$options);
* Param: $keyref anything (ref or scalar)
* Param: $valueref anything (ref or scalar)
* Param: $options HASH (optional)
* Return: void
$sds->set_ref($keyref, $valueref);
$options = {
info_columns => [ "col1", "col2" ],
info_values => [ "value1", "value2" ],
};
$sds->set_ref($keyref, $valueref, $options);
* Signature: $valueref = $sds->get_ref($keyref);
* Param: $keyref anything (ref or scalar)
* Return: $valueref anything (ref or scalar)
$valueref = $sds->get_ref($keyref);
* Signature: $blob = $sds->serialize($ref);
* Return: $ref any (ref)
* Return: $blob scalar (binary)
$blob = $sds->serialize($ref);
* Signature: $ref = $sds->deserialize($blob);
* Param: $blob scalar (binary)
* Return: $ref any (ref)
$ref = $sds->deserialize($blob);
* Signature: $hashkey = $sds->hashkey($keyref);
* Return: $keyref any (ref or scalar)
* Return: $hashkey scalar
$hashkey = $sds->hashkey($keyref);
Returns "SharedDatastore";
* Signature: $service_type = App::SharedDatastore->service_type();
* Param: void
* Return: $service_type string
$service_type = $sds->service_type();
* Author: Stephen Adkins <spadkins@gmail.com> * License: This is free software. It is licensed under the same terms as Perl itself.
App::Context|App::Context,
App::Service|App::Service
| App-Context documentation | view source | Contained in the App-Context distribution. |