Module slide_chord

Slide protocol used for Chord ring maintenance (also see the dht_node_move module).

Copyright © 2010-2014 Zuse Institute Berlin

Version: $Id$

Behaviours: slide_beh.

Authors: Nico Kruber (kruber@zib.de).

Description

Slide protocol used for Chord ring maintenance (also see the dht_node_move module). Note: assumes that the neighborhood does not change during the handling of a message.

Function Index

abort_slide/4Executed when aborting the given slide operation (assumes the SlideOp has already been set up).
finish_delta1/3Removes the dht_node's message forward for the slide operation's interval and continues by sending a message to ReplyPid (if receiving from pred, right after the RM is up-to-date).
finish_delta2/3Cleans up after finish_delta1/4 once the RM is up-to-date, e.g.
finish_delta_ack1/3No-op with chord RT.
finish_delta_ack2/4No-op with chord RT.
prepare_join_send/2
prepare_rcv_data/2
prepare_send_data1/3Prepares sending data for the given (existing!) slide operation and changes the own ID if necessary.
prepare_send_data2/3Cleans up after prepare_send_data1/3 once the RM is up-to-date, (no-op here).
prepare_send_delta1/3Accepts data_ack received during the given (existing!) slide operation and continues be sending a message to ReplyPid (if sending to pred, right after the RM is up-to-date).
prepare_send_delta2/3Cleans up after prepare_send_delta1/3 once the RM is up-to-date, e.g.
rm_exec/5
update_rcv_data1/3Accepts data received during the given (existing!) slide operation, writes it to the DB and changes the own ID if necessary.
update_rcv_data2/3Cleans up after update_rcv_data1/3 once the RM is up-to-date, (no-op here).

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()}

Prepares sending data for the given (existing!) slide operation and changes the own ID if necessary.

See also: prepare_send_data2/3, dht_node_move:prepare_send_data1/2.

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()}

Cleans up after prepare_send_data1/3 once the RM is up-to-date, (no-op here).

See also: prepare_send_data1/3, dht_node_move:prepare_send_data2/3.

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()}

Accepts data received during the given (existing!) slide operation, writes it to the DB and changes the own ID if necessary.

See also: update_rcv_data2/3, dht_node_move:update_rcv_data1/5.

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()}

Cleans up after update_rcv_data1/3 once the RM is up-to-date, (no-op here).

See also: update_rcv_data1/3, dht_node_move:update_rcv_data2/3.

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()}

Accepts data_ack received during the given (existing!) slide operation and continues be sending a message to ReplyPid (if sending to pred, right after the RM is up-to-date).

See also: prepare_send_delta2/3, dht_node_move:prepare_send_delta1/2.

prepare_send_delta2/3

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

Cleans up after prepare_send_delta1/3 once the RM is up-to-date, e.g. removes temporary additional db_range entries.

See also: prepare_send_delta1/3, dht_node_move:prepare_send_delta2/3.

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()}

Removes the dht_node's message forward for the slide operation's interval and continues by sending a message to ReplyPid (if receiving from pred, right after the RM is up-to-date).

See also: finish_delta2/3, dht_node_move:finish_delta1/3.

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()}

Cleans up after finish_delta1/4 once the RM is up-to-date, e.g. removes temporary additional db_range entries.

See also: finish_delta1/4, dht_node_move:finish_delta2/3.

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()}

No-op with chord RT.

See also: finish_delta_ack2/3, dht_node_move:finish_delta_ack1/2.

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}

No-op with chord RT.

See also: finish_delta_ack1/3, dht_node_move:finish_delta_ack2/3.

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).

rm_exec/5

rm_exec(Pid :: pid(),
        X2 :: term(),
        OldNeighbors :: nodelist:neighborhood(),
        NewNeighbors :: nodelist:neighborhood(),
        Reason :: rm_loop:reason()) ->
           ok


Generated by EDoc, Sep 11 2020, 15:24:44.