Nebulex.Distributed.Cluster (Nebulex.Distributed v3.0.0-rc.1)
View SourceThis module is used by cache adapters for distributed caching functionality.
Summary
Functions
Finds a node in the ring.
Joins the node where the cache name
's supervisor process is running to the
name
's node group.
Makes the node where the cache name
's supervisor process is running, leave
the name
's node group.
Wrapper for :pg.monitor_scope/1
.
Returns the :pg
child spec.
Returns the list of nodes joined to given name
's node group.
Returns the :pg
scope.
Returns the list of nodes in the ring.
Functions
@spec find_node(ExHashRing.Ring.ring(), any()) :: {:ok, node()} | {:error, Nebulex.Error.t()}
Finds a node in the ring.
@spec join(name :: atom()) :: :ok
Joins the node where the cache name
's supervisor process is running to the
name
's node group.
@spec leave(name :: atom()) :: :ok
Makes the node where the cache name
's supervisor process is running, leave
the name
's node group.
@spec monitor_scope() :: reference()
Wrapper for :pg.monitor_scope/1
.
@spec pg_child_spec() :: Supervisor.child_spec()
Returns the :pg
child spec.
Returns the list of nodes joined to given name
's node group.
@spec pg_scope() :: atom()
Returns the :pg
scope.
@spec ring_nodes(ExHashRing.Ring.ring()) :: [node()]
Returns the list of nodes in the ring.