NAME

Zing::Registry - Process Registry

ABSTRACT

Generic Process Registry

SYNOPSIS

use Zing::Process;
use Zing::Registry;

my $process = Zing::Process->new;
my $registry = Zing::Registry->new(process => $process);

# $registry->recv($process);

DESCRIPTION

This package provides a process registry for tracking active processes.

INHERITS

This package inherits behaviors from:

Zing::KeyVal

LIBRARIES

This package uses type constraints from:

Zing::Types

ATTRIBUTES

This package has the following attributes:

name

name(Str)

This attribute is read-only, accepts (Str) values, and is optional.

METHODS

This package implements the following methods:

drop

drop(Process $proc) : Int

The drop method returns truthy if the process can be dropped from the registry.

drop example #1
# given: synopsis

$registry->drop($process);

recv

recv(Process $proc) : Maybe[HashRef]

The recv method fetches the process metadata (if any) from the registry.

recv example #1
# given: synopsis

$registry->recv($process);
recv example #2
# given: synopsis

$registry->send($process);

$registry->recv($process);

send

send(Process $proc) : Str

The send method commits the process metadata to the registry overwriting any existing data.

send example #1
# given: synopsis

$registry->send($process);
send example #2
# given: synopsis

$registry->drop;

$registry->send($process);

term

term(Str @keys) : Str

The term method generates a term (safe string) for the registry.

term example #1
# given: synopsis

$registry->term($process->name);

AUTHOR

Al Newkirk, awncorp@cpan.org

LICENSE

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".

PROJECT

Wiki

Project

Initiatives

Milestones

Contributing

Issues