# Module snapshot_state

- Description
- Data Types
- Function Index
- Function Details

Local state information needed for the S3 snapshot algorithm.

Copyright © 2012 Zuse Institute Berlin

Version: $Id$

Authors: Stefan Keidel (`keidel@informatik.hu-berlin.de`).

## Description

Local state information needed for the S3 snapshot algorithm

## Data Types

### snapshot_state()

    snapshot_state() =
        {SnapNo :: non_neg_integer(),
         InProgress :: boolean(),
         Leaders :: [comm:mypid()]}

## Function Index

add_leader/2 |
get_leaders/1 |
get_number/1 |
is_in_progress/1 |
new/0 |
new/3 |
set_number/2 |
start_progress/1 |
stop_progress/1 |

## Function Details

### new/0

    new() -> snapshot_state()

### new/3

    new(Number :: non_neg_integer(),
        InProgress :: boolean(),
        Leaders :: [comm:mypid() | none]) ->
           snapshot_state()

### get_number/1

    get_number(X1 :: snapshot_state()) -> non_neg_integer()

### is_in_progress/1

    is_in_progress(X1 :: snapshot_state()) -> boolean()

### get_leaders/1

    get_leaders(X1 :: snapshot_state()) -> [comm:mypid()]

### set_number/2

    set_number(SnapInfo :: snapshot_state(),
               NewVal :: non_neg_integer()) ->
                  snapshot_state()

### add_leader/2

    add_leader(State :: snapshot_state(),
               NewLeader :: comm:mypid() | none) ->
                  snapshot_state()

### start_progress/1

    start_progress(SnapInfo :: snapshot_state()) -> snapshot_state()

### stop_progress/1

    stop_progress(SnapInfo :: snapshot_state()) -> snapshot_state()

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