anchor.diff:      ;
   
   % return my clusters
  -on_active({query_clustering, Pid}, {Centroids, _Epoch, _ResetTriggerState, _ClusterTriggerState} = State) ->
  -    comm:send(Pid, {query_clustering_response, Centroids}),
  +on_active({query_clustering, Pid}, #state_active{centroids=C} = State) ->
  +    comm:send(Pid, {query_clustering_response, C}),
       State
       ;
   
  -on_active({query_epoch, Pid},
  -    {_Centroids, Epoch,_ResetTriggerState, _ClusterTriggerState} = State) ->
  -    comm:send(Pid, {query_epoch_response, Epoch}),
  +on_active({query_epoch, Pid}, #state_active{local_epoch=E} = State) ->
  +    comm:send(Pid, {query_epoch_response, E}),
       State
       .
   
  
positive.code:     {cy_cache, [node:node_type()]} |
      {clustering_shuffle, comm:mypid(), dc_centroids:centroids(), non_neg_integer()} |
      {clustering_shuffle_reply, comm:mypid(), dc_centroids:centroids(), non_neg_integer()} |
      {query_clustering, comm:mypid()}).
  
  %% @doc Sends an initialization message to the node's dc_clustering process.
  -spec activate() -> ok | ignore.
  
negative.code: init({ResetTrigger, ClusterTrigger}) ->
      ResetTriggerState = trigger:init(ResetTrigger, fun get_clustering_reset_interval/0, reset_clustering),
      ClusterTriggerState = trigger:init(ClusterTrigger, fun get_clustering_interval/0, start_clustering_shuffle),
      Radius = case config:read(dc_clustering_radius) of
          failed -> exit(dc_clustering_radius_not_set);
          R when R > 0 -> R;
          _Else -> exit(dc_clustering_radius_invalid)
      end,
      #state_inactive{
          queued_messages = msg_queue:new()
          , reset_trigger_state = ResetTriggerState
          , cluster_trigger_state = ClusterTriggerState
          , radius=Radius
      }
      .
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Message Loop
  