Module dht_node_db_cache

Caches some DB values that are not relevant for consistence.

Copyright © 2013 Zuse Institute Berlin

Version: $Id$

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

Description

Caches some DB values that are not relevant for consistence.

Data Types

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_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_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, Jul 23 2015, 22:07:46.