anchor.diff:            ring        :: riak_core_ring:riak_core_ring(),
             partitions  :: [tuple()],
             nodes       :: [tuple()],
  -          update      :: reference()
  +          update_tick :: boolean()
           }).
   
   %% hack: periodically update the ring with itself
   -define(INTERVAL, 3000).
   
   %% delay used after a ring update
  --define(RING_UPDATE_DELAY, 500).
  +-define(UPDATE_TICK_TIMEOUT, 2000).
   
   %% ===================================================================
   %% Public API
  
positive.code:     {reply,{ok,V,P},State}.
  
  %% calls that don't block and don't reply
  handle_cast ({update_ring,Ring},State=#state{update=TimerRef}) ->
      %% Whenever we receive a ring update, what we actually do is start
      %% a timer that will actually process the new ring after a certain
      %% period of time has elapsed. We do this because ring updates come
      %% in spurts and we don't want to process all of those changes, we
      %% only want the last change.
  
      %% cancel the current delay timer, and wait a bit longer
      erlang:cancel_timer(TimerRef),
  
      %% setup the new timer to actually update with the new ring
      NewRef=erlang:send_after(?RING_UPDATE_DELAY,
                               self(),
                               {actually_update_ring,Ring}),
      {noreply,State#state{update=NewRef}};
  
  handle_cast ({update_services,Services},State) ->
      {noreply,update_services(State,Services)}.
  
negative.code: 
  get_partitions () ->
      gen_server:call(?MODULE,get_partitions,infinity).
  
  force_update () ->
      gen_server:cast(?MODULE,update_ring,infinity).
  
  %% ===================================================================
  %% gen_server callbacks
  