# Module snapshot_leader_state

- Description
- Data Types
- Function Index
- Function Details

Local state information needed for the leader of 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 leader of the S3 snapshot algorithm

## Data Types

### state()

    state() =
        {SnapNo :: non_neg_integer(),
         InProgress :: boolean(),
         Snapshots :: ets:tid() | atom(),
         Interval :: intervals:interval(),
         ErrorInterval :: intervals:interval(),
         Client :: comm:mypid() | false}

## Function Index

add_error_interval/2 |
add_interval/2 |
add_snapshot/2 |
get_client/1 |
get_error_interval/1 |
get_global_snapshot/1 |
get_number/1 |
interval_union_is_all/1 |
is_in_progress/1 |
new/0 |
new/4 |
set_number/2 |
start_progress/1 |
stop_progress/1 |

## Function Details

### new/0

    new() -> state()

### new/4

    new(Number :: non_neg_integer(),
        InProgress :: boolean(),
        Client :: comm:mypid() | false,
        X4 :: state()) ->
           state()

### get_number/1

    get_number(State :: state()) -> non_neg_integer()

### is_in_progress/1

    is_in_progress(State :: state()) -> boolean()

### get_global_snapshot/1

    get_global_snapshot(State :: state()) -> list()

### get_client/1

    get_client(State :: state()) -> comm:mypid()

### interval_union_is_all/1

    interval_union_is_all(State :: state()) -> boolean()

### get_error_interval/1

    get_error_interval(State :: state()) -> intervals:interval()

### set_number/2

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

### add_snapshot/2

    add_snapshot(X1 :: state(), NewSnapshot :: any()) -> state()

### add_interval/2

    add_interval(X1 :: state(), NewInterval :: intervals:interval()) ->
                    state()

### add_error_interval/2

    add_error_interval(X1 :: state(),
                       NewInterval :: intervals:interval()) ->
                          state()

### start_progress/1

    start_progress(SnapInfo :: state()) -> state()

### stop_progress/1

    stop_progress(SnapInfo :: state()) -> state()

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