# Module rm_leases

- Description
- Data Types
- Function Index
- Function Details

Ring maintenance with leases.

Copyright © 2007-2015 Zuse Institute Berlin

Version: $$

Behaviours: `gen_component`.

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

## Description

Ring maintenance with leases.

## Data Types

### state()

    state() =
        #state{takeovers =
                   gb_trees:tree(rt_chord:key(), l_on_cseq:lease_t())}

## Function Index

get_takeovers/1 |
init/1 | Initialises the module with an empty state.
rm_exec/5 |
rm_filter/3 |
start_gen_component/5 |
start_link/1 | Starts the ring maintenence process.

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

### start_link/1

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

Starts the ring maintenence process

### init/1

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

Initialises the module with an empty state.

### rm_filter/3

    rm_filter(OldNeighbors :: nodelist:neighborhood(),
              NewNeighbors :: nodelist:neighborhood(),
              IsSlide :: rm_loop:reason()) ->
                 boolean()

### rm_exec/5

    rm_exec(Pid :: pid(),
            Tag :: rm_leases,
            OldNeighbors :: nodelist:neighborhood(),
            NewNeighbors :: nodelist:neighborhood(),
            Reason :: rm_loop:reason()) ->
               ok

### get_takeovers/1

    get_takeovers(RMLeasesPid :: comm:erl_local_pid()) ->
                     gb_trees:tree(rt_chord:key(),
                                   l_on_cseq:lease_t())

Generated by EDoc, Feb 29 2016, 16:12:13.