anchor.diff:  -record(rr_resolve_state,
           {
            ownerPid       = ?required(rr_resolve_state, ownerPid)         :: comm:erl_local_pid(),
  -         ownerMonitor   = null                                          :: null | reference(),
            dhtNodePid     = ?required(rr_resolve_state, dhtNodePid)       :: comm:erl_local_pid(),
            operation      = nil        									:: nil | operation(),
            stats          = #resolve_stats{}                              :: stats(),
  
positive.code: 
  -spec init(state()) -> state().
  init(State) ->
      Mon = erlang:monitor(process, State#rr_resolve_state.ownerPid),
      State#rr_resolve_state{ ownerMonitor = Mon }.
  
  -spec start() -> {ok, MyPid::pid()}.
  start() ->        
      gen_component:start(?MODULE, fun ?MODULE:on/2, get_start_state(), []).
  
  -spec start(rrepair:session_id()) -> {ok, MyPid::pid()}.
  start(SID) ->        
      State = get_start_state(),
      Stats = State#rr_resolve_state.stats,
      gen_component:start(?MODULE, fun ?MODULE:on/2,
                          State#rr_resolve_state{ stats = Stats#resolve_stats{ session_id = SID } }, []).
  
  -spec get_start_state() -> state().
  get_start_state() ->
  
negative.code:     State#rr_resolve_state{ stats = NewStats, feedback = NewFB };
  
  on({shutdown, _}, #rr_resolve_state{ ownerPid = Owner,
                                       send_stats = SendStats,
                                       stats = Stats }) ->
      send_stats(SendStats, Stats),
      comm:send_local(Owner, {resolve_progress_report, self(), Stats}),
      kill.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  