anchor.diff:      {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()}).
  +    {query_clustering, comm:mypid()} |
  +    {query_epoch, comm:mypid()}
  +).
   
   %% @doc Sends an initialization message to the node's dc_clustering process.
   -spec activate() -> ok | ignore.
  
positive.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),
      {inactive, msg_queue:new(), ResetTriggerState, ClusterTriggerState}.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % Message Loop
  
negative.code: -export([init/1, on_inactive/2, on_active/2,
           activate/0, deactivate/0]).
  
  -record(state_active,{
          centroids = [] :: dc_centroids:centroids()
          , local_epoch = 0 :: non_neg_integer()
          , reset_trigger_state :: trigger:state()
          , cluster_trigger_state :: trigger:state()
          , radius :: float()
  }).
  
  -record(state_inactive,{
          queued_messages :: msg_queue:msg_queue()
          , reset_trigger_state :: trigger:state()
          , cluster_trigger_state :: trigger:state()
          , radius :: float()
  }).
  
  % state of the clustering loop
  -type(state_active() :: #state_active{}).
  -type(state_inactive() :: #state_inactive{}).
  %% -type(state() :: state_active() | state_inactive()).
  
  % accepted messages of an initialized dc_clustering process
  