NAME

Zing::KeyVal - Key/Value Store

ABSTRACT

Generic Key/Value Store

SYNOPSIS

use Zing::KeyVal;

my $keyval = Zing::KeyVal->new(name => 'notes');

# $keyval->recv;

DESCRIPTION

This package provides a general-purpose key/value store abstraction.

INHERITS

This package inherits behaviors from:

Zing::Repo

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:

poll

poll() : Poll

The poll method returns a Zing::Poll object which can be used to perform a blocking-fetch from the store.

poll example #1
# given: synopsis

$keyval->poll;

recv

recv() : Maybe[HashRef]

The recv method fetches the data (if any) from the store.

recv example #1
# given: synopsis

$keyval->recv;
recv example #2
# given: synopsis

$keyval->send({ status => 'happy' });

$keyval->recv;

send

send(HashRef $value) : Str

The send method commits data to the store overwriting any existing data.

send example #1
# given: synopsis

$keyval->send({ status => 'happy' });
send example #2
# given: synopsis

$keyval->drop;

$keyval->send({ status => 'happy' });

term

term() : Str

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

term example #1
# given: synopsis

$keyval->term;

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