Module fd

Failure detector based on Guerraoui.

Copyright © 2007-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

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

Description

Failure detector based on Guerraoui.

Data Types

event()

event() = crash | jump | leave

reason()

reason() = 'DOWN' | noconnection | term()

state()

state() = [HBPid :: pid()]

a list of all hbs processes launched by this fd

Function Index

init/1Initialises the module with an empty state.
report/3Reports the calling process' group as being shut down due to a graceful leave operation.
start_gen_component/5
start_link/1Starts the failure detector server.
subscribe/2Generates a failure detector for the calling process on the given pid.
subscribe_refcount/2Generates a failure detector for the calling process on the given pid - uses reference counting to be subscribed to a pid only once.
subscriptions/0show subscriptions.
unsubscribe/2Deletes the failure detector for the given pid.
unsubscribe_refcount/2Deletes the failure detector for the given pid - uses reference counting to be subscribed to a pid only once.
update_subscriptions/3Unsubscribes Subscriber from the pids in OldPids but not in NewPids and subscribes to the pids in NewPids but not in OldPids (Subscribers can be pid() or an envelop as created by comm:reply_as/3).

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

subscribe/2

subscribe(Subscriber :: comm:erl_local_pid(),
          WatchedPids :: [comm:mypid()]) ->
             ok

Generates a failure detector for the calling process on the given pid.

subscribe_refcount/2

subscribe_refcount(Subscriber :: comm:erl_local_pid(),
                   WatchedPids :: [comm:mypid()]) ->
                      ok

Generates a failure detector for the calling process on the given pid - uses reference counting to be subscribed to a pid only once. Unsubscribe with unsubscribe_refcount/3!

unsubscribe/2

unsubscribe(Subscriber :: comm:erl_local_pid(),
            WatchedPids :: [comm:mypid()]) ->
               ok

Deletes the failure detector for the given pid.

unsubscribe_refcount/2

unsubscribe_refcount(Subscriber :: comm:erl_local_pid(),
                     WatchedPids :: [comm:mypid()]) ->
                        ok

Deletes the failure detector for the given pid - uses reference counting to be subscribed to a pid only once. Subscribe with subscribe_refcount/3!

update_subscriptions/3

update_subscriptions(Subscriber :: comm:erl_local_pid(),
                     OldWatchedPids :: [comm:mypid()],
                     NewWatchedPids :: [comm:mypid()]) ->
                        ok

Unsubscribes Subscriber from the pids in OldPids but not in NewPids and subscribes to the pids in NewPids but not in OldPids (Subscribers can be pid() or an envelop as created by comm:reply_as/3).

report/3

report(Event :: event(), LocalPids :: [pid()], Data :: term()) ->
          ok

Reports the calling process' group as being shut down due to a graceful leave operation.

start_link/1

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

Starts the failure detector server

init/1

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

Initialises the module with an empty state.

subscriptions/0

subscriptions() -> ok

show subscriptions


Generated by EDoc, Aug 2 2016, 13:44:18.