GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::RIAK::OBJECT (3)

.ds Aq ’

NAME

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

CONTENTS

VERSION

version 0.1702

SYNOPSIS



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



DESCRIPTION

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

    ATTRIBUTES

<B>keyB>


    my $key = $obj->key;



Get the key of this object

<B>clientB>
<B>bucketB>
<B>dataB> Get or set the data stored in this object.
<B>rB>
<B>wB>
<B>dwB>
<B>content_typeB>
<B>linksB> Get an array of Net::Riak::Link objects
<B>existsB> Return true if the object exists, false otherwise.
<B>siblingsB> Return an array of Siblings

    METHODS

all_links Return the number of links
has_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
all_meta Returns a hash containing all the meta name/value pairs



    my %metadata = $obj->all_meta;



has_meta Returns the number of usermetas associated with the object. Typical use is as a predicate method.



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



set_meta Sets a usermeta on the object, overriding any existing value for that key



    $obj->set_meta( key => $value );



get_meta Reads a single usermeta from the object. If multiple usermeta headers have been set for a single key (eg via another client), the values will be separated with a comma; Riak will concatenate the input headers and only return a single one.
remove_meta removes a single usermeta from the object. Returns false on failure, eg if the key did not exist on the object.



 $obj->remove_meta( key ) || die( "could not remove" );



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.
<B>wB> W-value, wait for this many partitions to respond before returning to client.
<B>dwB> 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.
<B>rB> R-Value, wait for this many partitions to respond before returning to client.

delete


    $obj->delete($dw);



Delete this object from Riak.
<B>dwB> 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_object 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>, robin edwards <robin.ge@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::RIAK::OBJECT (3) 2013-03-20

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.