barrel_p2p_shard (barrel_p2p v0.1.0)
View SourceSummary
Functions
Whether this node currently owns Key.
The current live member set (sorted).
The top-N distinct owner nodes for Key (for replicated placement), best owner first.
The ring partition Key falls in. Consumers (e.g. reminders) use this to map keys to partitions without duplicating ring/hash logic.
The node that should own Key cluster-wide.
Functions
Whether this node currently owns Key.
-spec members() -> [node()].
The current live member set (sorted).
-spec merge_delta(barrel_p2p_ormap:ormap()) -> ok.
-spec owners(term(), pos_integer()) -> [node()].
The top-N distinct owner nodes for Key (for replicated placement), best owner first.
-spec partition(term()) -> non_neg_integer().
The ring partition Key falls in. Consumers (e.g. reminders) use this to map keys to partitions without duplicating ring/hash logic.
The node that should own Key cluster-wide.
-spec subscribe(pid()) -> ok.
-spec unsubscribe(pid()) -> ok.