View Source Singleton (singleton v1.3.1)

Singleton application.

The top supervisor of the :singleton OTP application is a DynamicSupervisor. Singleton can manage many singleton processes at the same time. Each singleton is identified by its unique name term.

Link to this section Summary

Functions

Callback implementation for Application.start/2.

Start a new singleton process. Optionally provide the on_conflict parameter which will be called whenever a singleton process shuts down due to another instance being present in the cluster.

Link to this section Functions

Callback implementation for Application.start/2.

Link to this function

start_child(module, args, name, on_conflict \\ fn -> nil end)

View Source

Start a new singleton process. Optionally provide the on_conflict parameter which will be called whenever a singleton process shuts down due to another instance being present in the cluster.

This function needs to be executed on all nodes where the singleton process is allowed to live. The actual process will be started only once; a manager process is started on each node for each singleton to ensure that the process continues on (possibly) another node in case of node disconnects or crashes.

Link to this function

stop_child(module, args)

View Source