Franck Cuny > Net-Riak-0.11 > Net::Riak::Object

Download:
Net-Riak-0.11.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.11   Source   Latest Release: Net-Riak-0.1702

NAME ^

Net::Riak::Object - holds meta information about a Riak object

VERSION ^

version 0.11

SYNOPSIS ^

    my $obj = $bucket->get('foo');

DESCRIPTION ^

The Net::Riak::Object holds meta information about a Riak object, plus the object's data.

ATTRIBUTES

key
    my $key = $obj->key;

Get the key of this object

client
bucket
data

Get or set the data stored in this object.

r
w
dw
content_type
status

Get the HTTP status from the last operation on this object.

links

Get an array of Net::Riak::Link objects

exists

Return true if the object exists, false otherwise.

siblings

Return an array of Siblings

METHODS

count_links

Return the number of links

append_link

Add a new link

get_siblings

Return the number of siblings

add_sibling

Add a new sibling

count_siblings
get_sibling

Return a sibling

store
    $obj->store($w, $dw);

Store the object in Riak. When this operation completes, the object could contain new metadata and possibly new data if Riak contains a newer version of the object according to the object's vector clock.

w

W-value, wait for this many partitions to respond before returning to client.

dw

DW-value, wait for this many partitions to confirm the write before returning to client.

load
    $obj->load($w);

Reload the object from Riak. When this operation completes, the object could contain new metadata and a new value, if the object was updated in Riak since it was last retrieved.

r

R-Value, wait for this many partitions to respond before returning to client.

delete
    $obj->delete($dw);

Delete this object from Riak.

dw

DW-value. Wait until this many partitions have deleted the object before responding.

clear
    $obj->reset;

Reset this object

has_siblings
    if ($obj->has_siblings) { ... }

Return true if this object has siblings

has_no_siblings
   if ($obj->has_no_siblings) { ... }

Return true if this object has no siblings

populate

Given the output of RiakUtils.http_request and a list of statuses, populate the object. Only for use by the Riak client library.

add_link
    $obj->add_link($obj2, "tag");

Add a link to a Net::Riak::Object

remove_link
    $obj->remove_link($obj2, "tag");

Remove a link to a Net::Riak::Object

add

Start assembling a Map/Reduce operation

link

Start assembling a Map/Reduce operation

map

Start assembling a Map/Reduce operation

reduce

Start assembling a Map/Reduce operation

AUTHOR ^

franck cuny <franck@lumberjaph.net>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2010 by linkfluence.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: