NAME
Queue::Q::ClaimFIFO::Item - An item in a 'ClaimFIFO' queue
SYNOPSIS
use Queue::Q::ClaimFIFO::Redis; # or ::Perl or ...
my $q = ... create object of chosen ClaimFIFO implementation...
# consumer:
my $item = $q->claim_item; # this is a Queue::Q::ClaimFIFO::Item!
my $data = $item->data;
# work with data...
$q->mark_item_as_done($item);
DESCRIPTION
Instances of this class represent a single item in a ClaimFIFO
type queue (or DistFIFO
if that is based on ClaimFIFO
shards).
Typically, you do not have to create Queue::Q::ClaimFIFO::Item
objects manually. They are implicitly created by the queue when you enqueue a new data structure.
METHODS
new
Takes named parameters. Requires an data
parameter that is the item's content.
If the queue backend implementation requires serialization (which is bound to be the general case), the data must be a data structure that can be serialized in the Sereal
format using Sereal::Encoder.
data
Returns the item's content.
item_data
Alias for data
. DEPRECATED.
AUTHOR
Steffen Mueller, <smueller@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.