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: 
  -spec new_session(round(), comm:mypid(), rr_recon:method()) -> session().
  new_session(Round, Pid, RCMethod) ->
      #session{ id = {Round, Pid}, rc_method = RCMethod }.
  
  -spec session_id_equal(session_id(), session_id()) -> boolean().
  session_id_equal({{R, _}, Pid}, {{R, _}, Pid}) -> true;
  
negative.code: -spec init(module()) -> state().
  init(Trigger) ->	
      TriggerState = trigger:init(Trigger, fun get_update_interval/0, ?TRIGGER_NAME),
      GCTrigger   = trigger:init(trigger_periodic, fun get_gc_interval/0, ?GC_TRIGGER),
      #rrepair_state{ trigger_state = trigger:next(TriggerState),
                      gc_trigger = trigger:next(GCTrigger) }.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Config handling
  %
  % USED CONFIG FIELDS
  %	I) 	 rr_trigger: module name of any trigger
  %	II)  rr_trigger_interval: integer duration until next triggering (milliseconds)
  %	III) rr_recon_metod: set reconciliation algorithm name
  %   IV)  rr_trigger_probability: this is the probability of starting a synchronisation 
  %								 with a random node if trigger has fired. ]0,100]
  %   V)   rr_session_ttl: time to live for sessions until they are garbage collected (milliseconds)
  %   VI)  rr_gc_interval: garbage collector execution interval (milliseconds)
  %
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
  