Module resource_factory

The module is a factory of resources.

Copyright © 2013 Alexei Krasnopolski

Version: 1.0.1

Introduced in: 2013-02-20

Behaviours: resource_factory.

Authors: Alexei Krasnopolski (krasnop@bellsouth.net) [web site: http://krasnopolski.org/].

Description

The module is a factory of resources.

Function Index

activate/2Some action during activation of a resource before moving the resource from pool to client (not implemented for default module).
create/1Creates new resource.
destroy/2Destroyes a resource.
passivate/2Some action during passivation of a resource after returning the resource from use to pool (not implemented for default module).
validate/2Validate resource: if resource is alive and valid then returns true, otherwise - false.

Function Details

create/1

create(_Resource_metadata::term()) -> {ok, Resource}

Creates new resource.

destroy/2

destroy(_Resource_metadata::term(), _Resource::term()) -> noreturn()

Destroyes a resource.

validate/2

validate(_Resource_metadata::term(), _Resource::term()) -> boolean()

Validate resource: if resource is alive and valid then returns true, otherwise - false.

activate/2

activate(_Resource_metadata::term(), _Resource::term()) -> ok

Some action during activation of a resource before moving the resource from pool to client (not implemented for default module).

passivate/2

passivate(_Resource_metadata::term(), _Resource::term()) -> ok

Some action during passivation of a resource after returning the resource from use to pool (not implemented for default module).


Generated by EDoc, Apr 25 2013, 23:51:18.