Module riak_core_bucket

Functions for manipulating bucket properties.

Description

Functions for manipulating bucket properties.

Data Types

bucket()

bucket() = binary() | {bucket_type(), binary()}

bucket_type()

bucket_type() = riak_core_bucket_type:bucket_type()

nval_set()

nval_set() = ordsets:ordset(pos_integer())

properties()

properties() = [property()]

property()

property() = {PropName::atom(), PropValue::any()}

riak_core_ring()

riak_core_ring() = riak_core_ring:riak_core_ring()

Function Index

all_n/1
append_bucket_defaults/1Add a list of defaults to global list of defaults for new buckets.
bucket_nval_map/1returns a proplist containing all buckets and their respective N values.
default_object_nval/0returns the default n value for buckets that have not explicitly set the property.
get_bucket/1Return the complete current list of properties for Bucket.
get_buckets/1Get bucket properties Props for all the buckets in the given Ring and stored in metadata.
get_value/2
merge_props/2Merge two sets of bucket props.
n_val/1
name/1
reset_bucket/1Reset the bucket properties for Bucket to the settings inherited from its Bucket Type.
set_bucket/2Set the given BucketProps in Bucket or {BucketType, Bucket}.

Function Details

all_n/1

all_n(Ring::riak_core_ring()) -> [pos_integer(), ...]

append_bucket_defaults/1

append_bucket_defaults(Items) -> any()

Add a list of defaults to global list of defaults for new buckets. If any item is in Items is already set in the current defaults list, the new setting is omitted, and the old setting is kept. Omitting the new setting is intended behavior, to allow settings from app.config to override any hard-coded values.

bucket_nval_map/1

bucket_nval_map(Ring::riak_core_ring()) -> [{binary(), integer()}]

returns a proplist containing all buckets and their respective N values

default_object_nval/0

default_object_nval() -> integer()

returns the default n value for buckets that have not explicitly set the property

get_bucket/1

get_bucket(Bucket::riak_object:bucket()) -> {ok, BucketProps::riak_core_bucketprops()} | {error, no_type}

Return the complete current list of properties for Bucket. Properties include but are not limited to:

  n_val: how many replicas of objects in this bucket (default: 3)
  allow_mult: can objects in this bucket have siblings? (default: false)
  linkfun: a function returning a m/r FunTerm for link extraction
  

get_buckets/1

get_buckets(Ring::riak_core_ring()) -> Props::list()

Get bucket properties Props for all the buckets in the given Ring and stored in metadata

get_value/2

get_value(Key::atom(), Proplist::properties()) -> any()

merge_props/2

merge_props(Overriding::list(), Other::list()) -> list()

Merge two sets of bucket props. If duplicates exist, the entries in Overriding are chosen before those in Other.

n_val/1

n_val(BProps) -> any()

name/1

name(BProps) -> any()

reset_bucket/1

reset_bucket(Bucket::binary()) -> ok

Reset the bucket properties for Bucket to the settings inherited from its Bucket Type

set_bucket/2

set_bucket(Bucket::bucket(), BucketProps::[{atom(), any()}]) -> ok | {error, no_type | [{atom(), atom()}]}

Set the given BucketProps in Bucket or {BucketType, Bucket}. If BucketType does not exist, or is not active, {error, no_type} is returned.


Generated by EDoc