# Module service_per_vm

- Description
- Data Types
- Function Index
- Function Details

Handling all Scalaris nodes inside an Erlang VM and Erlang VM wide maintenance tasks.

Copyright © 2010-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: `gen_component`.

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

## Description

Handling all Scalaris nodes inside an Erlang VM and Erlang VM wide maintenance tasks.

## Data Types

### message()

    message() =
        {get_dht_nodes, ReplyPid :: comm:mypid()} |
        {register_dht_node, PidToAdd :: comm:mypid()} |
        {deregister_dht_node, PidToRemove :: comm:mypid()} |
        {'DOWN',
         MonitorRef :: reference(),
         process,
         Owner :: comm:erl_local_pid(),
         Info :: any()} |
        {delete_node,
         SupPid :: pid() | atom(),
         SupId :: pid() | term()} |
        {trigger_gc} |
        {hi}

### state()

    state() =
        {[{MonitorRef :: reference(), DhtNode :: comm:mypid()}],
         boolean(),
         boolean()}

## Function Index

deregister_dht_node/1 | Sends a deregister message to a running service_per_vm to remove a local(!) dht_node process.
dump_node_states/0 | ask all local nodes for their state.
init/1 |
is_scalaris_ready/0 |
kill_nodes/1 |
kill_nodes_by_name/1 | kills Scalaris nodes from the current VM.
on/2 | registers a dht node.
register_dht_node/1 | Sends a register message to a running service_per_vm to register a local(!) dht_node process.
start_gen_component/5 |
start_link/1 |

## 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

### dump_node_states/0

    dump_node_states() -> [term()]

ask all local nodes for their state

### kill_nodes/1

    kill_nodes(No :: non_neg_integer()) -> ok

### kill_nodes_by_name/1

    kill_nodes_by_name(Names :: [pid_groups:groupname()]) -> ok

kills Scalaris nodes from the current VM

### register_dht_node/1

    register_dht_node(Pid :: comm:mypid()) -> ok

Sends a register message to a running service_per_vm to register a local(!) dht_node process.

### deregister_dht_node/1

    deregister_dht_node(Pid :: comm:mypid()) -> ok

Sends a deregister message to a running service_per_vm to remove a local(!) dht_node process.

### is_scalaris_ready/0

    is_scalaris_ready() -> boolean()

### start_link/1

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

### init/1

    init(Arg :: any()) -> state()

### on/2

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

registers a dht node

Generated by EDoc, Apr 22 2017, 15:58:20.