# Module sup_paxos

- Description
- Function Index
- Function Details

Supervisor to instantiate paxos processes (proposer, acceptor, learner).

Copyright © 2011, 2012 Zuse Institute Berlin

Version: $Id$

Behaviours: `supervisor`.

Authors: Florian Schintke (`schintke@zib.de`).

## Description

Supervisor to instantiate paxos processes (proposer, acceptor, learner). Each process that uses paxos should instantiate its own set of paxos processes to avoid clashing of paxos ids.

To name the processes inside a pid_group, a naming prefix can be passed %% to the start_link/2 call. The supervisor will append '_proposer', '_acceptor', and '_learner' to the given prefix for the individual processes. If no prefix is given, the processes register as 'paxos_proposer', 'paxos_acceptor', and 'paxos_learner' directly.

## Function Index

childs/1 |
init/1 |
start_link/1 |
supspec/1 |

## Function Details

### start_link/1

    start_link(X1 :: {pid_groups:groupname(), Options :: [tuple()]}) ->
                  {ok, Pid :: pid()} |
                  ignore |
                  {error,
                   Error ::
                       {already_started, Pid :: pid()} |
                       shutdown |
                       term()}

### init/1

    init(X :: [{pid_groups:groupname(), Options :: [tuple()]}]) ->
            {ok,
             {{one_for_one,
               MaxRetries :: pos_integer(),
               PeriodInSeconds :: pos_integer()},
              [ProcessDescr :: supervisor:child_spec()]}}

### supspec/1

    supspec(X1 :: any()) ->
               {ok,
                {{one_for_one,
                  MaxRetries :: pos_integer(),
                  PeriodInSeconds :: pos_integer()},
                 []}}

### childs/1

    childs(X1 :: [{pid_groups:groupname(), Options :: [tuple()]}]) ->
              [ProcessDescr :: supervisor:child_spec()]

Generated by EDoc, Feb 29 2016, 16:12:22.