# Module slide_leases

- Description
- Function Index
- Function Details

Slide protocol used for lease-based ring maintenance (also see the dht_node_move module).

Copyright © 2010-2014 Zuse Institute Berlin

Version: $Id$

Behaviours: `slide_beh`.

Authors: Thorsten Schütt (`schuett@zib.de`).

## Description

Slide protocol used for lease-based ring maintenance (also see the dht_node_move module).

## Function Index

abort_slide/4 | Executed when aborting the given slide operation (assumes the SlideOp has already been set up).
finish_delta1/3 |
finish_delta2/3 |
finish_delta_ack1/3 |
finish_delta_ack2/4 |
prepare_join_send/2 |
prepare_rcv_data/2 |
prepare_send_data1/3 |
prepare_send_data2/3 |
prepare_send_delta1/3 |
prepare_send_delta2/3 |
tester_create_dht_node_state/0 | create dht_node state for tester.
update_rcv_data1/3 |
update_rcv_data2/3 |

## Function Details

### prepare_join_send/2

    prepare_join_send(State :: dht_node_state:state(),
                      SlideOp :: slide_op:slide_op()) ->
                         {ok,
                          dht_node_state:state(),
                          slide_op:slide_op()}

### prepare_rcv_data/2

    prepare_rcv_data(State :: dht_node_state:state(),
                     SlideOp :: slide_op:slide_op()) ->
                        {ok,
                         dht_node_state:state(),
                         slide_op:slide_op()}

### prepare_send_data1/3

    prepare_send_data1(State :: dht_node_state:state(),
                       SlideOp :: slide_op:slide_op(),
                       ReplyPid :: comm:erl_local_pid()) ->
                          {ok,
                           dht_node_state:state(),
                           slide_op:slide_op()}

### prepare_send_data2/3

    prepare_send_data2(State :: dht_node_state:state(),
                       SlideOp :: slide_op:slide_op(),
                       EmbeddedMsg :: {continue}) ->
                          {ok,
                           dht_node_state:state(),
                           slide_op:slide_op()}

### update_rcv_data1/3

    update_rcv_data1(State :: dht_node_state:state(),
                     SlideOp :: slide_op:slide_op(),
                     ReplyPid :: comm:erl_local_pid()) ->
                        {ok,
                         dht_node_state:state(),
                         slide_op:slide_op()}

### update_rcv_data2/3

    update_rcv_data2(State :: dht_node_state:state(),
                     SlideOp :: slide_op:slide_op(),
                     EmbeddedMsg :: {continue}) ->
                        {ok,
                         dht_node_state:state(),
                         slide_op:slide_op()}

### prepare_send_delta1/3

    prepare_send_delta1(State :: dht_node_state:state(),
                        SlideOp :: slide_op:slide_op(),
                        ReplyPid :: comm:erl_local_pid()) ->
                           {ok,
                            dht_node_state:state(),
                            slide_op:slide_op()} |
                           {abort,
                            Reason :: unkown_lease,
                            State :: dht_node_state:state(),
                            SlideOp1 :: slide_op:slide_op()}

### prepare_send_delta2/3

    prepare_send_delta2(State :: dht_node_state:state(),
                        SlideOp :: slide_op:slide_op(),
                        EmbeddedMsg :: any()) ->
                           {ok,
                            dht_node_state:state(),
                            slide_op:slide_op()} |
                           {abort,
                            Reason ::
                                {protocol_error, EmbeddedMsg :: any()},
                            State :: dht_node_state:state(),
                            SlideOp1 :: slide_op:slide_op()}

### finish_delta1/3

    finish_delta1(State :: dht_node_state:state(),
                  SlideOp :: slide_op:slide_op(),
                  ReplyPid :: comm:erl_local_pid()) ->
                     {ok, dht_node_state:state(), slide_op:slide_op()}

### finish_delta2/3

    finish_delta2(State :: dht_node_state:state(),
                  SlideOp :: slide_op:slide_op(),
                  EmbeddedMsg :: {continue}) ->
                     {ok, dht_node_state:state(), slide_op:slide_op()}

### finish_delta_ack1/3

    finish_delta_ack1(State :: dht_node_state:state(),
                      SlideOp :: slide_op:slide_op(),
                      ReplyPid :: comm:erl_local_pid()) ->
                         {ok,
                          dht_node_state:state(),
                          slide_op:slide_op()}

### finish_delta_ack2/4

    finish_delta_ack2(State :: dht_node_state:state(),
                      SlideOp :: slide_op:slide_op(),
                      NextOpMsg,
                      EmbeddedMsg :: {continue}) ->
                         {ok,
                          dht_node_state:state(),
                          slide_op:slide_op(),
                          NextOpMsg}

-     NextOpMsg = dht_node_move:next_op_msg()

### abort_slide/4

    abort_slide(State :: dht_node_state:state(),
                SlideOp :: slide_op:slide_op(),
                Reason :: dht_node_move:abort_reason(),
                MoveMsgTag :: atom()) ->
                   dht_node_state:state()

Executed when aborting the given slide operation (assumes the SlideOp has already been set up).

### tester_create_dht_node_state/0

    tester_create_dht_node_state() -> dht_node_state:state()

create dht_node state for tester

Generated by EDoc, Apr 22 2017, 15:58:25.