diff options
Diffstat (limited to 'apps/mem3/src/mem3.erl')
-rw-r--r-- | apps/mem3/src/mem3.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/mem3/src/mem3.erl b/apps/mem3/src/mem3.erl index 41118d54..1021ee5b 100644 --- a/apps/mem3/src/mem3.erl +++ b/apps/mem3/src/mem3.erl @@ -15,7 +15,7 @@ -module(mem3). -export([start/0, stop/0, restart/0, nodes/0, shards/1, shards/2, - choose_shards/2]). + choose_shards/2, n/1]). -export([compare_nodelists/0, compare_shards/1]). -include("mem3.hrl"). @@ -58,6 +58,10 @@ compare_shards(DbName) -> end, orddict:new(), lists:zip(Replies, GoodNodes)), [{bad_nodes, BadNodes} | Dict]. +-spec n(DbName::iodata()) -> integer(). +n(DbName) -> + length(mem3:shards(DbName, <<"foo">>)). + -spec nodes() -> [node()]. nodes() -> mem3_nodes:get_nodelist(). |