anchor.diff:            rc_stats          = none                              :: rr_recon_stats:stats() | none,
             rs_stats          = none                              :: rr_resolve:stats() | none,
             rs_called         = 0                                 :: non_neg_integer(),
  -          rs_finish         = 0                                 :: non_neg_integer()
  +          rs_finish         = 0                                 :: non_neg_integer(),
  +          ttl               = ?required(session, ttl)           :: pos_integer()    %time to live in milliseconds
           }).
   -type session() :: #session{}.
  -%TODO Session TTL
   
   -record(rrepair_state,
           {
            trigger_state  = ?required(rrepair_state, trigger_state)   :: trigger:state(),
  +         gc_trigger     = ?required(rrepair_state, gc_trigger)      :: trigger:state(),     %garbage collector trigger to remove dead sessions
            round          = {0, 0}                                    :: round(),
            open_recon     = 0                                         :: non_neg_integer(),
            open_resolve   = 0                                         :: non_neg_integer(),
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % constants
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  -define(TRIGGER_NAME, rr_trigger).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % export
  
negative.code:         true ->
              config:cfg_is_module(rr_trigger) andalso
              config:cfg_is_atom(rr_recon_method) andalso
              config:cfg_is_integer(rr_session_ttl) andalso
              config:cfg_is_greater_than(rr_session_ttl, 0) andalso
  			config:cfg_is_integer(rr_trigger_probability) andalso
  			config:cfg_is_greater_than(rr_trigger_probability, 0) andalso
  			config:cfg_is_less_than_equal(rr_trigger_probability, 100) andalso
              config:cfg_is_integer(rr_gc_interval) andalso
              config:cfg_is_greater_than(rr_gc_interval, 0) andalso                
              config:cfg_is_integer(rr_trigger_interval) andalso
              config:cfg_is_greater_than(rr_trigger_interval, 0);
          _ -> true
      end.
  
  -spec get_recon_method() -> rr_recon:method().
  get_recon_method() ->  config:read(rr_recon_method).
  
  -spec get_update_trigger() -> Trigger::module().
  get_update_trigger() ->  config:read(rr_trigger).
  
  -spec get_update_interval() -> pos_integer().
  get_update_interval() -> config:read(rr_trigger_interval).
  
  -spec get_start_prob() -> pos_integer().
  get_start_prob() -> config:read(rr_trigger_probability).
  
  -spec get_session_ttl() -> pos_integer().
  get_session_ttl() -> config:read(rr_session_ttl).
  
  -spec get_gc_interval() -> pos_integer().
  get_gc_interval() -> config:read(rr_gc_interval).
  