NAME
Zing::PubSub - Pub/Sub Store
ABSTRACT
Generic Pub/Sub Store
SYNOPSIS
DESCRIPTION
This package provides a general-purpose publish/subscribe store abstraction.
INHERITS
This package inherits behaviors from:
LIBRARIES
This package uses type constraints from:
METHODS
This package implements the following methods:
poll
poll() : Poll
The poll method returns a Zing::Poll object which can be used to perform a blocking-fetch from the store.
recv
recv
() : Maybe[HashRef]
The recv method receives a single new message from the store.
send
send
(Str
$key
, HashRef
$value
) : Int
The send method sends a new message to the store and return the message count.
- send example #2
-
# given: synopsis
$pubsub
->drop;
$pubsub
->
send
({
task
=>
'stop'
});
$pubsub
->
send
({
task
=>
'restart'
});
term
term(Str
@keys
) : Str
The term method return a term (safe string) for the store.
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".