Electric.ShapeCache.ShapeStatus.ShapeDb.PoolRegistry (electric v1.5.1)

Copy Markdown View Source

Manages pool registration for a stack. Contains the exclusive_mode logic, so that when enabled, the same write connection is returned for reads and writes.

In exclusive_mode only the writer pool is started by the supervisor.

Summary

Functions

Returns a specification to start this module under a supervisor.

Used by ShapeDb to retrieve a pool.

Used by pool processes for registration. The exclusive? boolean is passed onto the register_name/2 call and determines whether the connection is registered for both reads and writes in exclusive_mode.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

pool_name(stack_id, role)

Used by ShapeDb to retrieve a pool.

pool_name(stack_id, role, exclusive?)

Used by pool processes for registration. The exclusive? boolean is passed onto the register_name/2 call and determines whether the connection is registered for both reads and writes in exclusive_mode.

register_name(arg, pid)

start_link(args)

unregister_name(arg)

whereis_name(arg)