Module mgmt_server

The management server maintains a list of scalaris nodes and checks their availability using a failure_detector.

Copyright © 2007-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

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

Description

The management server maintains a list of scalaris nodes and checks their availability using a failure_detector. Its main purpose is to give new scalaris nodes a list of nodes already in the system.

Data Types

message()

message() = 
    {fd_notify,
     fd:event(),
     PID :: comm:mypid(),
     Reason :: fd:reason()} |
    {get_list, SourcePid :: comm:mypid()} |
    {get_list_length, SourcePid :: comm:mypid()} |
    {register, Node :: node:node_type()}

state()

state() = gb_trees:tree(comm:mypid(), node:node_type())

Function Index

start_gen_component/5
number_of_nodes/0trigger a message with the number of nodes known to the mgmt server.
node_list/0trigger a message with all nodes known to the mgmt server.
node_list/1
on/2
init/1
start_link/2starts the server; called by the mgmt supervisor.

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

number_of_nodes/0

number_of_nodes() -> ok

trigger a message with the number of nodes known to the mgmt server

node_list/0

node_list() -> ok

trigger a message with all nodes known to the mgmt server

node_list/1

node_list(UseShepherd :: boolean()) -> ok

on/2

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

init/1

init(Options :: [tuple()]) -> state()

start_link/2

start_link(ServiceGroup :: pid_groups:groupname(),
           Options :: [tuple()]) ->
              {ok, pid()}

starts the server; called by the mgmt supervisor

See also: sup_scalaris.


Generated by EDoc, Sep 11 2020, 15:25:27.