# Module lb_info

- Description
- Data Types
- Function Index
- Function Details

For active load balancing: - contains information about a node - provides functions to evaluate an lb operation.

Copyright © 2014 Zuse Institute Berlin

Version: $Id$

Authors: Maximilian Michels (`michels@zib.de`).

## Description

For active load balancing: - contains information about a node - provides functions to evaluate an lb operation

## Data Types

### erlang_timestamp()

    erlang_timestamp() =
        {MegaSecs :: non_neg_integer(),
         Secs :: 0..999999,
         MicroSecs :: 0..999999}

### lb_info()

abstract datatype: `lb_info()`

### load()

    load() = unknown | number()

## Function Index

bound/3 |
get_items/1 |
get_load/1 |
get_load_change_jump/5 | Calculates the change in Variance no dht size available.
get_load_change_jump/6 | Calculates the change in Variance dht size available.
get_load_change_slide/4 | Calculates the change in Variance no dht size available.
get_load_change_slide/5 | Calculates the change in Variance dht size available.
get_node/1 |
get_oldest_data_time/1 |
get_reqs/1 |
get_succ/1 |
get_target_load/3 | The number of db entries the heavy node will give to the light node (weighted).
get_target_load/4 | The number of db entries the heavy node will give to the light node.
get_time/1 |
is_succ/2 |
is_valid/1 |
neighbors/2 |
new/1 | Creates a new record to hold essential load balancing values.

## Function Details

### new/1

    new(NodeDetails :: node_details:node_details()) -> lb_info()

Creates a new record to hold essential load balancing values

### get_load/1

    get_load(LBInfo :: lb_info()) -> load()

### get_reqs/1

    get_reqs(LBInfo :: lb_info()) -> load()

### get_items/1

    get_items(LBInfo :: lb_info()) -> load()

### get_node/1

    get_node(LBInfo :: lb_info()) -> node:node_type()

### get_succ/1

    get_succ(LBInfo :: lb_info()) -> node:node_type()

### get_time/1

    get_time(LBInfo :: lb_info()) -> erlang_timestamp()

### is_succ/2

    is_succ(Node1 :: lb_info(), Node2 :: lb_info()) -> boolean()

### neighbors/2

    neighbors(Node1 :: lb_info(), Node2 :: lb_info()) -> boolean()

### is_valid/1

    is_valid(Info :: lb_info()) -> boolean()

### get_target_load/4

    get_target_load(X1 :: items | requests,
                    Op :: slide | jump,
                    HeavyNode :: lb_info(),
                    LightNode :: lb_info()) ->
                       non_neg_integer()

The number of db entries the heavy node will give to the light node

### get_target_load/3

    get_target_load(Op :: slide | jump,
                    HeavyNode :: load(),
                    LightNode :: load()) ->
                       non_neg_integer()

The number of db entries the heavy node will give to the light node (weighted)

### get_load_change_slide/4

    get_load_change_slide(Metric :: items | requests,
                          TakenLoad :: non_neg_integer(),
                          HeavyNode :: lb_info(),
                          LightNode :: lb_info()) ->
                             LoadChange :: number()

Calculates the change in Variance no dht size available

### get_load_change_slide/5

    get_load_change_slide(Metric :: items | requests,
                          TakenLoad :: non_neg_integer(),
                          DhtSize :: pos_integer(),
                          HeavyNode :: lb_info(),
                          LightNode :: lb_info()) ->
                             LoadChange :: number()

Calculates the change in Variance dht size available

### get_load_change_jump/5

    get_load_change_jump(Metric :: items | requests,
                         TakenLoad :: non_neg_integer(),
                         HeavyNode :: lb_info(),
                         LightNode :: lb_info(),
                         LightNodeSucc :: lb_info()) ->
                            LoadChange :: number()

Calculates the change in Variance no dht size available

### get_load_change_jump/6

    get_load_change_jump(Metric :: items | requests,
                         TakenLoad :: non_neg_integer(),
                         DhtSize :: pos_integer(),
                         HeavyNode :: lb_info(),
                         LightNode :: lb_info(),
                         LightNodeSucc :: lb_info()) ->
                            LoadChange :: number()

Calculates the change in Variance dht size available

### get_oldest_data_time/1

    get_oldest_data_time(Other :: [lb_info()]) ->
                            OldestTime :: erlang_timestamp()

### bound/3

    bound(LowerBound :: number(),
          Value :: number(),
          UpperBound :: number()) ->
             number()

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