Module dht_node_db_cache

Caches some DB values that are not relevant for consistence.

Copyright © 2013-2015 Zuse Institute Berlin

Version: $Id$

Behaviours: gen_component.

Authors: Nico Kruber (kruber@zib.de).

Description

Caches some DB values that are not relevant for consistence.

Data Types

erlang_timestamp()

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

message()

message() = {get_split_key,
             DB :: db_dht:db(),
             CurRange :: intervals:interval(),
             Begin :: rt_chord:key(),
             End :: rt_chord:key(),
             TargetLoad :: pos_integer(),
             Direction :: forward | backward,
             SourcePid :: comm:erl_local_pid()}
          | {web_debug_info, Requestor :: comm:erl_local_pid()}

state()

state() = 
    [{DB :: db_dht:db(),
      Range :: intervals:interval(),
      Expires :: erlang_timestamp(),
      Key :: get_split_key,
      Val :: {rt_chord:key(), TakenLoad :: non_neg_integer()}}]

Function Index

init/1Initialises the module with an uninitialized state.
on/2
start_gen_component/5
start_link/1Starts a db_dht cache process, registers it with the process dictionary and returns its pid for use by a 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

start_link/1

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

Starts a db_dht cache process, registers it with the process dictionary and returns its pid for use by a supervisor.

init/1

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

Initialises the module with an uninitialized state.

on/2

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


Generated by EDoc, Feb 29 2016, 16:16:23.