Module dn_cache

Dead node Cache.

Copyright © 2007-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

Authors: Christian Hennig (hennig@zib.de).

Description

Dead node Cache

Data Types

message()

message() = {trigger}
          | {trigger_reply,
             {pong,
              PidName :: pid_groups:pidname() | undefined},
             node:node_type()}
          | {add_zombie_candidate, node:node_type()}
          | {subscribe, comm:erl_local_pid()}
          | {unsubscribe, comm:erl_local_pid()}
          | {send_error,
             Target :: comm:mypid(),
             {ping, ThisWithCookie :: comm:mypid()},
             Reason :: atom()}
          | {web_debug_info, Requestor :: comm:erl_local_pid()}

state()

state() = 
    {fix_queue:fix_queue(node:node_type()),
     Subscribers :: gb_sets:set(comm:erl_local_pid())}

Function Index

add_zombie_candidate/1Adds a dht_node PID to the dead node cache for further alive-checks.
init/1Initialises the module with an empty state.
on/2the Token takes care, that there is only one timermessage for stabilize.
start_gen_component/5
start_link/1Starts a Dead Node Cache process, registers it with the process dictionary and returns its pid for use by a supervisor.
subscribe/0
unsubscribe/0

Function Details

start_gen_component/5

start_gen_component(Module :: module(),
                    Handler :: gen_component:handler(),
                    Args :: term(),
                    Options :: [gen_component:option()],
                    Self :: pid()) ->
                       no_return() | ok

add_zombie_candidate/1

add_zombie_candidate(Node :: node:node_type()) -> ok

Adds a dht_node PID to the dead node cache for further alive-checks.

subscribe/0

subscribe() -> ok

unsubscribe/0

unsubscribe() -> ok

start_link/1

start_link(DHTNodeGroup :: pid_groups:groupname()) -> {ok, pid()}

Starts a Dead Node Cache process, registers it with the process dictionary and returns its pid for use by a supervisor.

init/1

init(X1 :: []) -> state()

Initialises the module with an empty state.

on/2

on(X1 :: message(), State :: state()) -> state()

the Token takes care, that there is only one timermessage for stabilize


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