Queue::Q::ClaimFIFO::Item - An item in a 'ClaimFIFO' queue
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->item_data; # work with data... $q->mark_item_as_done($item);
Instances of this class represent a single item in a ClaimFIFO type queue (or DistFIFO if that is based on ClaimFIFO shards).
ClaimFIFO
DistFIFO
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.
Queue::Q::ClaimFIFO::Item
Takes named parameters. Requires an item_data parameter that is the item's content.
item_data
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.
Sereal
Returns the item's content.
Steffen Mueller, <smueller@cpan.org>
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.
To install Queue::Q, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Queue::Q
CPAN shell
perl -MCPAN -e shell install Queue::Q
For more information on module installation, please visit the detailed CPAN module installation guide.