Behaviours: gen_server.
address() = string() | atom() | inet:ip_address()
The TCP/IP host name or address of the Riak node
bucket() = binary()
bucket_and_type() = {bucket_type(), bucket()}
bucket_prop() = {n_val, pos_integer()} | {allow_mult, boolean()} | {search_index, binary()}
bucket_props() = [bucket_prop()]
bucket_type() = binary()
client_id() = binary()
client_option() = queue_if_disconnected | {queue_if_disconnected, boolean()} | {connect_timeout, pos_integer()} | auto_reconnect | {auto_reconnect, boolean()} | keepalive | {keepalive, boolean()}
client_options() = [client_option()]
connection_failure() = {Reason::term(), FailureCount::integer()}
continuation() = undefined | binary()
cs_opt() = {timeout, timeout()} | {continuation, binary()} | {max_results, non_neg_integer() | all} | {start_key, binary()} | {start_incl, boolean()} | {end_key, binary()} | {end_incl, boolean()}
cs_opts() = [cs_opt()]
delete_option() = delete_quorum() | {n_val, pos_integer()} | {sloppy_quorum, boolean()}
delete_options() = [delete_option()]
delete_quorum() = read_quorum() | write_quorum() | {rw, ReadWriteQuorum::quorum()}
get_option() = read_quorum() | {if_modified, riakc_obj:vclock()} | {notfound_ok, boolean()} | {basic_quorum, boolean()} | head | deletedvclock | {n_val, pos_integer()} | {sloppy_quorum, boolean()}
get_options() = [get_option()]
index_opt() = {timeout, timeout()} | {call_timeout, timeout()} | {stream, boolean()} | {continuation, binary()} | {pagination_sort, boolean()} | {max_results, non_neg_integer() | all}
index_opts() = [index_opt()]
index_results() = #index_results_v1{keys = undefined | keys(), terms = undefined | index_terms(), continuation = undefined | continuation()} | #index_body_results_v1{objects = [riakc_obj()], continuation = undefined | continuation()}
index_term() = integer() | binary()
index_terms() = [{index_term(), binary()}] | undefined
key() = binary()
key_data() = undefined | term()
keys() = [binary()] | undefined
mapred_funterm() = {modfun, Module::atom(), Function::atom()} | {qfun, function()} | {strfun, list() | binary()} | {jsanon, binary() | {bucket(), key()}} | {jsfun, binary()}
mapred_inputs() = bucket() | bucket_and_type() | [{bucket(), key()} | {{bucket_and_type(), key()}, key_data()} | {{bucket(), key()}, key_data()}] | {modfun, Module::atom(), Function::atom(), [term()]} | {index, bucket(), Index::binary() | secondary_index_id(), key() | integer()} | {index, bucket(), Index::binary() | secondary_index_id(), StartKey::key() | integer(), EndKey::key() | integer()}
mapred_queryterm() = {map, mapred_funterm(), Arg::term(), Accumulate::boolean()} | {reduce, mapred_funterm(), Arg::term(), Accumulate::boolean()} | {link, Bucket::riakc_obj:bucket(), Tag::term(), Accumulate::boolean()}
mapred_result() = [term()]
msg_id() = non_neg_integer()
Request identifier for tunneled message types
portnum() = non_neg_integer()
The TCP port number of the Riak node's Protocol Buffers interface
preflist() = [#preflist_item{partition = undefined | non_neg_integer(), node = undefined | binary(), primary = undefined | boolean()}]
put_option() = write_quorum() | return_body | return_head | if_not_modified | if_none_match | {n_val, pos_integer()} | {sloppy_quorum, boolean()}
put_options() = [put_option()]
quorum() = non_neg_integer() | one | all | quorum | default
range_index_opt() = {return_terms, boolean()} | {term_regex, binary()}
range_index_opts() = [index_opt() | range_index_opt()]
read_quorum() = {r, ReadQuorum::quorum()} | {pr, PrimaryReadQuorum::quorum()}
req_id() = non_neg_integer()
riakc_obj() = riakc_obj:riakc_obj()
search_admin_opt() = {timeout, timeout()} | {call_timeout, timeout()}
search_admin_opts() = [search_admin_opt()]
search_doc() = [{binary(), binary()}]
search_index() = [{index, binary()} | {schema, binary()}]
search_option() = {rows, non_neg_integer()} | {start, non_neg_integer()} | {sort, binary()} | {filter, binary()} | {df, binary()} | {op, binary()} | {fl, [binary()]} | {presort, binary()}
search_options() = [search_option()]
search_result() = #search_results{docs = undefined | [search_doc()], max_score = undefined | float(), num_found = undefined | non_neg_integer()}
search_schema() = [{name, binary()} | {content, binary()}]
secondary_index_id() = {binary_index, string()} | {integer_index, string()}
server_info() = [server_prop()]
server_prop() = {node, binary()} | {server_version, binary()}
timeout_name() = ping_timeout | get_client_id_timeout | set_client_id_timeout | get_server_info_timeout | get_timeout | put_timeout | delete_timeout | list_buckets_timeout | list_buckets_call_timeout | list_keys_timeout | stream_list_keys_timeout | stream_list_keys_call_timeout | get_bucket_timeout | get_bucket_call_timeout | set_bucket_timeout | set_bucket_call_timeout | mapred_timeout | mapred_call_timeout | mapred_stream_timeout | mapred_stream_call_timeout | mapred_bucket_timeout | mapred_bucket_call_timeout | mapred_bucket_stream_call_timeout | search_timeout | search_call_timeout | timeout
write_quorum() = {w, WriteQuorum::quorum()} | {dw, DurableWriteQuorum::quorum()} | {pw, PrimaryWriteQuorum::quorum()}
counter_incr/4 | increment the pre-Riak 2 counter at bucket , key by amount |
counter_incr/5 | increment the pre-Riak 2 counter at Bucket , Key by Amount . |
counter_val/3 | get the current value of the pre-Riak 2 counter at Bucket , Key . |
counter_val/4 | get the current value of the pre-Riak 2 counter at Bucket , Key using
the read_qurom() Options provided. |
create_search_index/2 | Create a search index. |
create_search_index/3 | |
create_search_index/4 | |
create_search_schema/3 | Create a schema, which is a required component of an index. |
create_search_schema/4 | Create a schema, which is a required component of an index. |
cs_bucket_fold/3 | secret function, do not use, or I come to your house and keeel you. |
default_timeout/1 | Return the default timeout for an operation if none is provided. |
delete/3 | Delete the key/value. |
delete/4 | Delete the key/value specifying timeout or options. |
delete/5 | Delete the key/value with options and timeout. |
delete_obj/2 | Delete the riak object. |
delete_obj/3 | Delete the riak object with options. |
delete_obj/4 | Delete the riak object with options and timeout. |
delete_search_index/2 | Delete a search index. |
delete_search_index/3 | Delete a search index. |
delete_vclock/4 | Delete the object at Bucket/Key, giving the vector clock. |
delete_vclock/5 | Delete the object at Bucket/Key, specifying timeout or options and giving the vector clock. |
delete_vclock/6 | Delete the key/value with options and timeout and giving the vector clock. |
fetch_type/3 | Fetches the representation of a convergent datatype from Riak. |
fetch_type/4 | Fetches the representation of a convergent datatype from Riak, using the given request options. |
get/3 | Get bucket/key from the server. |
get/4 | Get bucket/key from the server specifying timeout. |
get/5 | Get bucket/key from the server supplying options and timeout. |
get_bucket/2 | Get bucket properties. |
get_bucket/3 | Get bucket properties specifying a server side timeout. |
get_bucket/4 | (Deprecated.) Get bucket properties specifying a server side and local call timeout. |
get_bucket_type/2 | |
get_bucket_type/3 | |
get_client_id/1 | Get the client id for this connection. |
get_client_id/2 | Get the client id for this connection specifying timeout. |
get_coverage/2 | Get minimal coverage plan. |
get_coverage/3 | Get parallel coverage plan if 3rd argument is >= 0. |
get_index/4 | (Deprecated.) Execute a secondary index equality query. |
get_index/5 | (Deprecated.) Execute a secondary index range query. |
get_index/6 | (Deprecated.) Execute a secondary index equality query with specified timeouts. |
get_index/7 | (Deprecated.) Execute a secondary index range query with specified timeouts. |
get_index_eq/4 | Execute a secondary index equality query. |
get_index_eq/5 | Execute a secondary index equality query with specified options
|
get_index_range/5 | Execute a secondary index range query. |
get_index_range/6 | Execute a secondary index range query with specified options. |
get_preflist/3 | Get active preflist. |
get_preflist/4 | Get active preflist specifying a server side timeout. |
get_search_index/2 | |
get_search_index/3 | |
get_search_schema/2 | |
get_search_schema/3 | |
get_server_info/1 | Get the server information for this connection. |
get_server_info/2 | Get the server information for this connection specifying timeout. |
is_connected/1 | Determines whether the client is connected. |
is_connected/2 | Determines whether the client is connected, with the specified timeout to the client process. |
legacy_list_buckets/2 | |
list_buckets/1 | List all buckets on the server in the "default" bucket type. |
list_buckets/2 | List all buckets in a bucket type, specifying server-side timeout. |
list_buckets/3 | |
list_keys/2 | List all keys in a bucket This is a potentially expensive operation and should not be used in production. |
list_keys/3 | List all keys in a bucket specifying timeout. |
list_search_indexes/1 | |
list_search_indexes/2 | |
mapred/3 | Perform a MapReduce job across the cluster. |
mapred/4 | Perform a MapReduce job across the cluster with a job timeout. |
mapred/5 | Perform a MapReduce job across the cluster with a job and local call timeout. |
mapred_bucket/3 | Perform a MapReduce job against a bucket across the cluster. |
mapred_bucket/4 | Perform a MapReduce job against a bucket with a timeout across the cluster. |
mapred_bucket/5 | Perform a MapReduce job against a bucket with a timeout across the cluster and local call timeout. |
mapred_bucket_stream/5 | Perform a streaming MapReduce job against a bucket with a timeout across the cluster. |
mapred_bucket_stream/6 | (Deprecated.) Perform a streaming MapReduce job against a bucket with a server timeout across the cluster and a call timeout. |
mapred_stream/4 | Perform a streaming MapReduce job across the cluster sending results to ClientPid. |
mapred_stream/5 | Perform a streaming MapReduce job with a timeout across the cluster. |
mapred_stream/6 | (Deprecated.) Perform a streaming MapReduce job with a map/red timeout across the cluster, a local call timeout and sending results to ClientPid. |
modify_type/5 | Fetches, applies the given function to the value, and then updates the datatype in Riak. |
ping/1 | Ping the server. |
ping/2 | Ping the server specifying timeout. |
put/2 | Put the metadata/value in the object under bucket/key. |
put/3 | Put the metadata/value in the object under bucket/key with options or timeout. |
put/4 | Put the metadata/value in the object under bucket/key with options and timeout. |
replace_coverage/3 | |
replace_coverage/4 | |
reset_bucket/2 | Reset bucket properties back to the defaults. |
reset_bucket/3 | Reset bucket properties back to the defaults. |
reset_bucket/4 | (Deprecated.) Reset bucket properties back to the defaults. |
search/3 | Execute a search query. |
search/4 | Execute a search query. |
search/5 | Execute a search query. |
search/6 | (Deprecated.) Execute a search query. |
set_bucket/3 | Set bucket properties. |
set_bucket/4 | Set bucket properties specifying a server side timeout. |
set_bucket/5 | (Deprecated.) Set bucket properties specifying a server side and local call timeout. |
set_bucket_type/3 | |
set_bucket_type/4 | |
set_client_id/2 | Set the client id for this connection. |
set_client_id/3 | Set the client id for this connection specifying timeout. |
set_options/2 | Change the options for this socket. |
set_options/3 | Like set_options/2, but with a gen_server timeout. |
set_search_index/3 | |
start/2 | Create a process to talk with the riak server on Address:Port. |
start/3 | Create a process to talk with the riak server on Address:Port with Options. |
start_link/2 | Create a linked process to talk with the riak server on Address:Port Client id will be assigned by the server. |
start_link/3 | Create a linked process to talk with the riak server on Address:Port with Options. |
stop/1 | Disconnect the socket and stop the process. |
stream_list_buckets/1 | |
stream_list_buckets/2 | |
stream_list_buckets/3 | |
stream_list_keys/2 | Stream list of keys in the bucket to the calling process. |
stream_list_keys/3 | Stream list of keys in the bucket to the calling process specifying server side timeout. |
tunnel/4 | Send a pre-encoded msg over the protocol buffer connection Returns {ok, Response} or {error, Reason}. |
update_type/4 | Updates the convergent datatype in Riak with local modifications stored in the container type. |
update_type/5 | Updates the convergent datatype in Riak with local modifications stored in the container type, using the given request options. |
counter_incr(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Amount::integer()) -> ok
increment the pre-Riak 2 counter at bucket
, key
by amount
counter_incr(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Amount::integer(), Options::[write_quorum()]) -> ok | {error, term()}
increment the pre-Riak 2 counter at Bucket
, Key
by Amount
.
use the provided write_quorum()
Options
for the operation.
A counter increment is a lot like a riak put
so the semantics
are the same for the given options.
counter_val(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key()) -> {ok, integer()} | {error, notfound}
get the current value of the pre-Riak 2 counter at Bucket
, Key
.
counter_val(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Options::[read_quorum()]) -> {ok, integer()} | {error, term()}
get the current value of the pre-Riak 2 counter at Bucket
, Key
using
the read_qurom()
Options
provided.
create_search_index(Pid::pid(), Index::binary()) -> ok | {error, term()}
Create a search index.
create_search_index(Pid::pid(), Index::binary(), Timeout::timeout() | search_admin_opts()) -> ok | {error, term()}
create_search_index(Pid::pid(), Index::binary(), SchemaName::binary(), Timeout::timeout() | search_admin_opts()) -> ok | {error, term()}
create_search_schema(Pid::pid(), SchemaName::binary(), Content::binary()) -> ok | {error, term()}
Create a schema, which is a required component of an index.
create_search_schema(Pid::pid(), SchemaName::binary(), Content::binary(), Opts::search_admin_opts()) -> ok | {error, term()}
Create a schema, which is a required component of an index.
cs_bucket_fold(Pid::pid(), Bucket::bucket() | bucket_and_type(), Opts::cs_opts()) -> {ok, reference()} | {error, term()}
secret function, do not use, or I come to your house and keeel you.
default_timeout(OpTimeout::timeout_name()) -> timeout()
Return the default timeout for an operation if none is provided. Falls back to the default timeout.
delete(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key()) -> ok | {error, term()}
Equivalent to delete(Pid, Bucket, Key, []).
Delete the key/value
delete(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), TimeoutOrOptions::timeout() | delete_options()) -> ok | {error, term()}
Equivalent to delete(Pid, Bucket, Key, Options, Timeout).
Delete the key/value specifying timeout or options. Note that the rw quorum is deprecated, use r and w.
delete(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Options::delete_options(), Timeout::timeout()) -> ok | {error, term()}
Delete the key/value with options and timeout. Note that the rw quorum is deprecated, use r and w.
delete_obj(Pid::pid(), Obj::riakc_obj()) -> ok | {error, term()}
Equivalent to delete_vclock(Pid, riakc_obj:bucket(Obj), riakc_obj:key(Obj), riakc_obj:vclock(Obj)).
Delete the riak object.
See also: delete_vclock/6.
delete_obj(Pid::pid(), Obj::riakc_obj(), Options::delete_options()) -> ok | {error, term()}
Equivalent to delete_vclock(Pid, riakc_obj:bucket(Obj), riakc_obj:key(Obj), riakc_obj:vclock(Obj), Options).
Delete the riak object with options.
See also: delete_vclock/6.
delete_obj(Pid::pid(), Obj::riakc_obj(), Options::delete_options(), Timeout::timeout()) -> ok | {error, term()}
Equivalent to delete_vclock(Pid, riakc_obj:bucket(Obj), riakc_obj:key(Obj), riakc_obj:vclock(Obj), Options, Timeout).
Delete the riak object with options and timeout.
See also: delete_vclock/6.
delete_search_index(Pid::pid(), Index::binary()) -> ok | {error, term()}
Delete a search index.
delete_search_index(Pid::pid(), Index::binary(), Opts::search_admin_opts()) -> ok | {error, term()}
Delete a search index.
delete_vclock(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), VClock::riakc_obj:vclock()) -> ok | {error, term()}
Equivalent to delete_vclock(Pid, Bucket, Key, VClock, []).
Delete the object at Bucket/Key, giving the vector clock.
delete_vclock(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), VClock::riakc_obj:vclock(), TimeoutOrOptions::timeout() | delete_options()) -> ok | {error, term()}
Equivalent to delete_vclock(Pid, Bucket, Key, VClock, Options, Timeout).
Delete the object at Bucket/Key, specifying timeout or options and giving the vector clock.
delete_vclock(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), VClock::riakc_obj:vclock(), Options::delete_options(), Timeout::timeout()) -> ok | {error, term()}
Delete the key/value with options and timeout and giving the vector clock. This form of delete ensures that subsequent get and put requests will be correctly ordered with the delete.
See also: delete_obj/4.
fetch_type(Pid::pid(), BucketAndType::bucket_and_type(), Key::binary()) -> {ok, riakc_datatype:datatype()} | {error, term()}
Fetches the representation of a convergent datatype from Riak.
fetch_type(Pid::pid(), BucketAndType::bucket_and_type(), Key::binary(), Options::[proplists:property()]) -> {ok, riakc_datatype:datatype()} | {error, term()}
Fetches the representation of a convergent datatype from Riak, using the given request options.
get(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key()) -> {ok, riakc_obj()} | {error, term()}
Equivalent to get(Pid, Bucket, Key, [], default_timeout(get_timeout)).
Get bucket/key from the server. Will return {error, notfound} if the key is not on the server.
get(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), TimeoutOrOptions::timeout() | get_options()) -> {ok, riakc_obj()} | {error, term()} | unchanged
Equivalent to get(Pid, Bucket, Key, Options, Timeout).
Get bucket/key from the server specifying timeout. Will return {error, notfound} if the key is not on the server.
get(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Options::get_options(), Timeout::timeout()) -> {ok, riakc_obj()} | {error, term()} | unchanged
Get bucket/key from the server supplying options and timeout.
unchanged
will be returned when the
{if_modified, Vclock}
option is specified and the
object is unchanged.
get_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type()) -> {ok, bucket_props()} | {error, term()}
Equivalent to get_bucket(Pid, Bucket, default_timeout(get_bucket_timeout)).
Get bucket properties.
get_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::timeout()) -> {ok, bucket_props()} | {error, term()}
Equivalent to get_bucket(Pid, Bucket, Timeout, default_timeout(get_bucket_call_timeout)).
Get bucket properties specifying a server side timeout.
get_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, bucket_props()} | {error, term()}
This function is deprecated: because CallTimeout
is ignored
Get bucket properties specifying a server side and local call timeout.
get_bucket_type(Pid, BucketType) -> any()
get_bucket_type(Pid, BucketType, Timeout) -> any()
get_client_id(Pid::pid()) -> {ok, client_id()} | {error, term()}
Equivalent to get_client_id(Pid, default_timeout(get_client_id_timeout)).
Get the client id for this connection
get_client_id(Pid::pid(), Timeout::timeout()) -> {ok, client_id()} | {error, term()}
Get the client id for this connection specifying timeout
get_coverage(Pid::pid(), Bucket::bucket()) -> {ok, term()} | {error, term()}
Equivalent to get_coverage(Pid, Bucket, undefined).
Get minimal coverage plan
get_coverage(Pid::pid(), Bucket::bucket(), MinPartitions::undefined | non_neg_integer()) -> {ok, term()} | {error, term()}
Get parallel coverage plan if 3rd argument is >= 0
get_index(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), Key::key() | integer()) -> {ok, index_results()} | {error, term()}
This function is deprecated: use get_index_eq/4
Execute a secondary index equality query.
See also: get_index_eq/4.
get_index(Pid::pid(), Bucket::bucket(), Index::binary() | secondary_index_id(), StartKey::key() | integer(), EndKey::key() | integer()) -> {ok, index_results()} | {error, term()}
This function is deprecated: use get_index_range/5
Execute a secondary index range query.
See also: get_index_range/5.
get_index(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), Key::key() | integer(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, index_results()} | {error, term()}
This function is deprecated: use get_index_eq/5
Execute a secondary index equality query with specified timeouts.
See also: get_index_eq/5.
get_index(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), StartKey::key() | integer() | list(), EndKey::key() | integer() | list(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, index_results()} | {error, term()}
This function is deprecated: use get_index_range/6
Execute a secondary index range query with specified timeouts.
See also: get_index_range/6.
get_index_eq(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), Key::key() | integer()) -> {ok, index_results()} | {error, term()}
Execute a secondary index equality query. equivalent to all defaults for the options.
See also: for options and their effect.
get_index_eq(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), Key::key() | integer(), Opts::index_opts()) -> {ok, index_results()} | {error, term()}
Execute a secondary index equality query with specified options
continuation
in the response if this option is used.get_index_range(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), StartKey::key() | integer(), EndKey::key() | integer()) -> {ok, index_results()} | {error, term()}
Execute a secondary index range query.
get_index_range(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary() | secondary_index_id(), StartKey::key() | integer() | list(), EndKey::key() | integer() | list(), Opts::range_index_opts()) -> {ok, index_results()} | {error, term()}
Execute a secondary index range query with specified options.
As well as the options documented for get_index_eq/5
, there is a further options
{return_terms, boolean{}
. When true
the indexed values will be returned
as well as the primary key. The formt of the returned values is
{results, [{value, primary_key}]}
See also: for effect of options..
get_preflist(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key()) -> {ok, preflist()} | {error, term()}
Equivalent to get_preflist(Pid, Bucket, Key, default_timeout(get_preflist_timeout)).
Get active preflist.
get_preflist(Pid::pid(), Bucket::bucket() | bucket_and_type(), Key::key(), Timeout::timeout()) -> {ok, preflist()} | {error, term()}
Equivalent to get_preflist(Pid, Bucket, Key, default_timeout(get_preflist_timeout)).
Get active preflist specifying a server side timeout.
get_search_index(Pid::pid(), Index::binary()) -> {ok, search_index()} | {error, term()}
get_search_index(Pid::pid(), Index::binary(), Opts::search_admin_opts()) -> {ok, search_index()} | {error, term()}
get_search_schema(Pid::pid(), SchemaName::binary()) -> {ok, search_schema()} | {error, term()}
get_search_schema(Pid::pid(), SchemaName::binary(), Opts::search_admin_opts()) -> {ok, search_schema()} | {error, term()}
get_server_info(Pid::pid()) -> {ok, server_info()} | {error, term()}
Equivalent to get_server_info(Pid, default_timeout(get_server_info_timeout)).
Get the server information for this connection
get_server_info(Pid::pid(), Timeout::timeout()) -> {ok, server_info()} | {error, term()}
Get the server information for this connection specifying timeout
is_connected(Pid::pid()) -> true | {false, [connection_failure()]}
Equivalent to is_connected(Pid, infinity).
Determines whether the client is connected. Returns true if connected, or false and a list of connection failures and frequencies if disconnected.
is_connected(Pid::pid(), Timeout::timeout()) -> true | {false, [connection_failure()]}
Determines whether the client is connected, with the specified timeout to the client process. Returns true if connected, or false and a list of connection failures and frequencies if disconnected.
See also: is_connected/1.
legacy_list_buckets(Pid, Options) -> any()
list_buckets(Pid::pid()) -> {ok, [bucket()]} | {error, term()}
Equivalent to list_buckets(Pid, default_timeout(list_buckets_timeout)).
List all buckets on the server in the "default" bucket type. This is a potentially expensive operation and should not be used in production.
list_buckets(Pid::pid(), Type::timeout() | list() | binary()) -> {ok, [bucket()]} | {error, term()}
List all buckets in a bucket type, specifying server-side timeout. This is a potentially expensive operation and should not be used in production.
list_buckets(Pid, Type, Options) -> any()
list_keys(Pid::pid(), Bucket::bucket() | bucket_and_type()) -> {ok, [key()]} | {error, term()}
Equivalent to list_keys(Pid, Bucket, default_timeout(list_keys_timeout)).
List all keys in a bucket This is a potentially expensive operation and should not be used in production.
list_keys(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::list() | timeout()) -> {ok, [key()]} | {error, term()}
List all keys in a bucket specifying timeout. This is
implemented using stream_list_keys/3
and then waiting for
the results to complete streaming.
This is a potentially expensive operation and should not be used in production.
list_search_indexes(Pid::pid()) -> {ok, [search_index()]} | {error, term()}
list_search_indexes(Pid::pid(), Opts::search_admin_opts()) -> {ok, [search_index()]} | {error, term()}
mapred(Pid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()]) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, term()}
Equivalent to mapred(Inputs, Query, default_timeout(mapred)).
Perform a MapReduce job across the cluster. See the MapReduce documentation for explanation of behavior.
mapred(Pid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()], Timeout::timeout()) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, term()}
Equivalent to mapred(Pid, Inputs, Query, Timeout, default_timeout(mapred_call_timeout)).
Perform a MapReduce job across the cluster with a job timeout. See the MapReduce documentation for explanation of behavior.
mapred(Pid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()], Timeout::timeout(), CallTimeout::timeout()) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, term()}
Perform a MapReduce job across the cluster with a job and
local call timeout. See the MapReduce documentation for
explanation of behavior. This is implemented by using
mapred_stream/6
and then waiting for all results.
See also: mapred_stream/6.
mapred_bucket(Pid::pid(), Bucket::bucket(), Query::[mapred_queryterm()]) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
Equivalent to mapred_bucket(Pid, Bucket, Query, default_timeout(mapred_bucket_timeout)).
Perform a MapReduce job against a bucket across the cluster. See the MapReduce documentation for explanation of behavior. This uses list_keys under the hood and so is potentially an expensive operation that should not be used in production.
mapred_bucket(Pid::pid(), Bucket::bucket(), Query::[mapred_queryterm()], Timeout::timeout()) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
Equivalent to mapred_bucket(Pid, Bucket, Query, Timeout, default_timeout(mapred_bucket_call_timeout)).
Perform a MapReduce job against a bucket with a timeout across the cluster. See the MapReduce documentation for explanation of behavior. This uses list_keys under the hood and so is potentially an expensive operation that should not be used in production.
mapred_bucket(Pid::pid(), Bucket::bucket(), Query::[mapred_queryterm()], Timeout::timeout(), CallTimeout::timeout()) -> {ok, mapred_result()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
Perform a MapReduce job against a bucket with a timeout across the cluster and local call timeout. See the MapReduce documentation for explanation of behavior. This uses list_keys under the hood and so is potentially an expensive operation that should not be used in production.
mapred_bucket_stream(ConnectionPid::pid(), Bucket::bucket(), Query::[mapred_queryterm()], ClientPid::pid(), Timeout::timeout()) -> {ok, req_id()} | {error, term()}
Equivalent to mapred_bucket_stream(Pid, Bucket, Query, ClientPid, Timeout, default_timeout(mapred_bucket_stream_call_timeout)).
Perform a streaming MapReduce job against a bucket with a timeout across the cluster. See the MapReduce documentation for explanation of behavior. This uses list_keys under the hood and so is potentially an expensive operation that should not be used in production. The ClientPid will receive messages in this format:
{ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}} {ReqId::req_id(), done}
mapred_bucket_stream(ConnectionPid::pid(), Bucket::bucket(), Query::[mapred_queryterm()], ClientPid::pid(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, req_id()} | {error, term()}
This function is deprecated: because CallTimeout
is ignored
Perform a streaming MapReduce job against a bucket with a server timeout across the cluster and a call timeout. See the MapReduce documentation for explanation of behavior. This uses list_keys under the hood and so is potentially an expensive operation that should not be used in production. The ClientPid will receive messages in this format:
{ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}} {ReqId::req_id(), done}
mapred_stream(ConnectionPid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()], ClientPid::pid()) -> {ok, req_id()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
Equivalent to mapred_stream(ConnectionPid, Inputs, Query, ClientPid, default_timeout(mapred_stream_timeout)).
Perform a streaming MapReduce job across the cluster sending results to ClientPid. See the MapReduce documentation for explanation of behavior. The ClientPid will receive messages in this format:
{ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}} {ReqId::req_id(), done}
mapred_stream(ConnectionPid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()], ClientPid::pid(), Timeout::timeout()) -> {ok, req_id()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
Equivalent to mapred_stream(ConnectionPid, Inputs, Query, ClientPid, Timeout, default_timeout(mapred_stream_call_timeout)).
Perform a streaming MapReduce job with a timeout across the cluster. sending results to ClientPid. See the MapReduce documentation for explanation of behavior. The ClientPid will receive messages in this format:
{ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}} {ReqId::req_id(), done}
mapred_stream(ConnectionPid::pid(), Inputs::mapred_inputs(), Query::[mapred_queryterm()], ClientPid::pid(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, req_id()} | {error, {badqterm, mapred_queryterm()}} | {error, timeout} | {error, Err::term()}
This function is deprecated: because CallTimeout
is ignored
Perform a streaming MapReduce job with a map/red timeout across the cluster, a local call timeout and sending results to ClientPid. See the MapReduce documentation for explanation of behavior. The ClientPid will receive messages in this format:
{ReqId::req_id(), {mapred, Phase::non_neg_integer(), mapred_result()}} {ReqId::req_id(), done}
modify_type(Pid::pid(), Fun::fun((riakc_datatype:datatype()) -> riakc_datatype:datatype()), BucketAndType::bucket_and_type(), Key::binary(), ModifyOptions::[proplists:property()]) -> ok | {ok, riakc_datatype:datatype()} | {error, term()}
Fetches, applies the given function to the value, and then updates the datatype in Riak. If an existing value is not found, but you want the updates to apply anyway, use the 'create' option.
ping(Pid::pid()) -> pong
Equivalent to ping(Pid, default_timeout(ping_timeout)).
Ping the server
ping(Pid::pid(), Timeout::timeout()) -> pong
Ping the server specifying timeout
put(Pid::pid(), Obj::riakc_obj()) -> ok | {ok, riakc_obj()} | {ok, key()} | {error, term()}
Equivalent to put(Pid, Obj, []).
Put the metadata/value in the object under bucket/key
See also: put/4.
put(Pid::pid(), Obj::riakc_obj(), TimeoutOrOptions::timeout() | put_options()) -> ok | {ok, riakc_obj()} | riakc_obj() | {ok, key()} | {error, term()}
Equivalent to put(Pid, Obj, Options, Timeout).
Put the metadata/value in the object under bucket/key with options or timeout.
See also: put/4.
put(Pid::pid(), Obj::riakc_obj(), Options::put_options(), Timeout::timeout()) -> ok | {ok, riakc_obj()} | riakc_obj() | {ok, key()} | {error, term()}
throws siblings
Put the metadata/value in the object under bucket/key with
options and timeout. Put throws siblings
if the
riakc_obj contains siblings that have not been resolved by
calling riakc_obj:select_sibling/2
or riakc_obj:update_value/2
and riakc_obj:update_metadata/2
. If the object has no key and
the Riak node supports it, {ok, Key::key()}
will be returned
when the object is created, or {ok, Obj::riakc_obj()}
if
return_body
was specified.
replace_coverage(Pid, Bucket, Cover) -> any()
replace_coverage(Pid, Bucket, Cover, Other) -> any()
reset_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type()) -> ok | {error, term()}
Equivalent to reset_bucket(Pid, Bucket, default_timeout(reset_bucket_timeout), default_timeout(reset_bucket_call_timeout)).
Reset bucket properties back to the defaults.
reset_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::timeout()) -> ok | {error, term()}
Equivalent to reset_bucket(Pid, Bucket, Timeout, default_timeout(reset_bucket_call_timeout)).
Reset bucket properties back to the defaults.
reset_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::timeout(), CallTimeout::timeout()) -> ok | {error, term()}
This function is deprecated: because CallTimeout
is ignored
Reset bucket properties back to the defaults.
search(Pid::pid(), Index::binary(), SearchQuery::binary()) -> {ok, search_result()} | {error, term()}
Execute a search query. This command will return an error unless executed against a Riak Search cluster.
search(Pid::pid(), Index::binary(), SearchQuery::binary(), Options::search_options()) -> {ok, search_result()} | {error, term()}
Execute a search query. This command will return an error unless executed against a Riak Search cluster.
search(Pid::pid(), Index::binary(), SearchQuery::binary(), Options::search_options(), Timeout::timeout()) -> {ok, search_result()} | {error, term()}
Execute a search query. This command will return an error unless executed against a Riak Search cluster.
search(Pid::pid(), Index::binary(), SearchQuery::binary(), Options::search_options(), Timeout::timeout(), CallTimeout::timeout()) -> {ok, search_result()} | {error, term()}
This function is deprecated: because CallTimeout
is ignored
Execute a search query. This command will return an error unless executed against a Riak Search cluster.
set_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), BucketProps::bucket_props()) -> ok | {error, term()}
Equivalent to set_bucket(Pid, Bucket, BucketProps, default_timeout(set_bucket_timeout)).
Set bucket properties.
set_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), BucketProps::bucket_props(), Timeout::timeout()) -> ok | {error, term()}
Equivalent to set_bucket(Pid, Bucket, BucketProps, Timeout, default_timeout(set_bucket_call_timeout)).
Set bucket properties specifying a server side timeout.
set_bucket(Pid::pid(), Bucket::bucket() | bucket_and_type(), BucketProps::bucket_props(), Timeout::timeout(), CallTimeout::timeout()) -> ok | {error, term()}
This function is deprecated: because CallTimeout
is ignored
Set bucket properties specifying a server side and local call timeout.
set_bucket_type(Pid, BucketType, BucketProps) -> any()
set_bucket_type(Pid, BucketType, BucketProps, Timeout) -> any()
set_client_id(Pid::pid(), ClientId::client_id()) -> {ok, client_id()} | {error, term()}
Equivalent to set_client_id(Pid, ClientId, default_timeout(set_client_id_timeout)).
Set the client id for this connection
set_client_id(Pid::pid(), ClientId::client_id(), Timeout::timeout()) -> {ok, client_id()} | {error, term()}
Set the client id for this connection specifying timeout
set_options(Pid::pid(), Options::client_options()) -> ok
Equivalent to set_options(Pid, Options, infinity).
Change the options for this socket. Allows you to connect with one set of options then run with another (e.g. connect with no options to make sure the server is there, then enable queue_if_disconnected).
See also: start_link/3.
set_options(Pid::pid(), Options::client_options(), Timeout::timeout()) -> ok
Like set_options/2, but with a gen_server timeout.
See also: start_link/3.
set_search_index(Pid::pid(), Bucket::bucket() | bucket_and_type(), Index::binary()) -> ok | {error, term()}
Create a process to talk with the riak server on Address:Port. Client id will be assigned by the server.
start(Address::address(), Port::portnum(), Options::client_options()) -> {ok, pid()} | {error, term()}
Create a process to talk with the riak server on Address:Port with Options.
Create a linked process to talk with the riak server on Address:Port Client id will be assigned by the server.
start_link(Address::address(), Port::portnum(), Options::client_options()) -> {ok, pid()} | {error, term()}
Create a linked process to talk with the riak server on Address:Port with Options. Client id will be assigned by the server.
stop(Pid::pid()) -> ok
Disconnect the socket and stop the process.
stream_list_buckets(Pid) -> any()
stream_list_buckets(Pid, Type) -> any()
stream_list_buckets(Pid, Type, Options) -> any()
Equivalent to stream_list_keys(Pid, Bucket, default_timeout(stream_list_keys_timeout)).
Stream list of keys in the bucket to the calling process. The process receives these messages.
{ReqId::req_id(), {keys, [key()]}} {ReqId::req_id(), done}This is a potentially expensive operation and should not be used in production.
stream_list_keys(Pid::pid(), Bucket::bucket() | bucket_and_type(), Timeout::integer() | list()) -> {ok, req_id()} | {error, term()}
Equivalent to stream_list_keys(Pid, Bucket, Timeout, default_timeout(stream_list_keys_call_timeout)).
Stream list of keys in the bucket to the calling process specifying server side timeout. The process receives these messages.
{ReqId::req_id(), {keys, [key()]}} {ReqId::req_id(), done}This is a potentially expensive operation and should not be used in production.
tunnel(Pid::pid(), MsgId::msg_id(), Pkt::iolist(), Timeout::timeout()) -> {ok, binary()} | {error, term()}
Send a pre-encoded msg over the protocol buffer connection Returns {ok, Response} or {error, Reason}
update_type(Pid::pid(), BucketAndType::bucket_and_type(), Key::binary(), Update::riakc_datatype:update(term())) -> ok | {ok, Key::binary()} | {ok, riakc_datatype:datatype()} | {ok, Key::binary(), riakc_datatype:datatype()} | {error, term()}
Updates the convergent datatype in Riak with local modifications stored in the container type.
update_type(Pid::pid(), BucketAndType::bucket_and_type(), Key::binary(), Update::riakc_datatype:update(term()), Options::[proplists:property()]) -> ok | {ok, Key::binary()} | {ok, riakc_datatype:datatype()} | {ok, Key::binary(), riakc_datatype:datatype()} | {error, term()}
Updates the convergent datatype in Riak with local modifications stored in the container type, using the given request options.
Generated by EDoc, Dec 16 2016, 16:38:07.