Module rm_chord

Chord-like ring maintenance.

Copyright © 2008-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: rm_beh.

Authors: Thorsten Schuett (schuett@zib.de).

Description

Chord-like ring maintenance

Data Types

custom_message()

custom_message() = {rm,
                    get_succlist,
                    Source_Pid :: comm:mypid()}
                 | {rm,
                    {rm,
                     node_info_response,
                     NodeDetails :: node_details:node_details()},
                    from_succ | from_node}
                 | {rm,
                    get_succlist_response,
                    Succ :: node:node_type(),
                    SuccsSuccList ::
                        nodelist:non_empty_snodelist()}

state()

abstract datatype: state()

Function Index

check_config/0Checks whether config parameters of the rm_chord process exist and are valid.
contact_new_nodes/1
fd_notify/4Failure detector reported dead/changed node.
get_neighbors/1
get_web_debug_info/1
handle_custom_message/2Message handler when the module is fully initialized.
init/3Initialises the state when rm_loop receives an init_rm message.
init_first/0Nothing to do.
new_pred/2
new_succ/2
trigger_action/1
trigger_interval/0the interval between two stabilization runs.
unittest_create_state/1
update_node/2
zombie_node/2

Function Details

get_neighbors/1

get_neighbors(X1 :: state()) -> nodelist:neighborhood()

init_first/0

init_first() -> ok

Nothing to do.

init/3

init(Me :: node:node_type(),
     Pred :: node:node_type(),
     Succ :: node:node_type()) ->
        state()

Initialises the state when rm_loop receives an init_rm message.

unittest_create_state/1

unittest_create_state(Neighbors :: nodelist:neighborhood()) ->
                         state()

handle_custom_message/2

handle_custom_message(X1 :: custom_message(), State :: state()) ->
                         {ChangeReason :: {unknown}
                                        | {node_discovery},
                          state()} |
                         unknown_event

Message handler when the module is fully initialized.

trigger_action/1

trigger_action(State :: state()) ->
                  {ChangeReason :: rm_loop:reason(), state()}

new_pred/2

new_pred(State :: state(), NewPred :: node:node_type()) ->
            {ChangeReason :: rm_loop:reason(), state()}

new_succ/2

new_succ(State :: state(), NewSucc :: node:node_type()) ->
            {ChangeReason :: rm_loop:reason(), state()}

update_node/2

update_node(State :: state(), NewMe :: node:node_type()) ->
               {ChangeReason :: rm_loop:reason(), state()}

contact_new_nodes/1

contact_new_nodes(NewNodes :: [node:node_type()]) -> ok

fd_notify/4

fd_notify(State :: state(),
          Event :: fd:event(),
          DeadPid :: comm:mypid(),
          Data :: term()) ->
             {ChangeReason :: rm_loop:reason(), state()}

Failure detector reported dead/changed node.

zombie_node/2

zombie_node(State :: state(), Node :: node:node_type()) ->
               {ChangeReason :: rm_loop:reason(), state()}

get_web_debug_info/1

get_web_debug_info(State :: state()) -> [{string(), string()}]

check_config/0

check_config() -> boolean()

Checks whether config parameters of the rm_chord process exist and are valid.

trigger_interval/0

trigger_interval() -> pos_integer()

the interval between two stabilization runs


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