anchor.diff:  %% Description: Handling cast messages
   %% @hidden
   %%--------------------------------------------------------------------
  +handle_cast(poll_shard_urls, #state{urls=Urls}=State) ->
  +    case lookup_urls() of
  +        Urls ->
  +            {noreply, State};
  +        NewList ->
  +            {Removed, Added} = list_diff(Urls, NewList),
  +            [begin
  +                logplex_sup:start_child(logplex_read_queue_sup, [Url]),
  +                logplex_sup:start_child(logplex_redis_buffer_sup, [Url])
  +            end || Url <- Added],
  +            [begin
  +                [begin
  +                    case logplex_read_queue:url(Pid) of
  +                        Url -> supervisor:terminate_child(logplex_read_queue_sup, Id);
  +                        _ -> ok
  +                    end
  +                end || {Id, Pid, worker, _Modules} <- supervisor:which_children(logplex_read_queue_sup)],
  +                [begin
  +                    case logplex_redis_buffer:url(Pid) of
  +                        Url -> supervisor:terminate_child(logplex_redis_buffer_sup, Id);
  +                        _ -> ok
  +                    end
  +                end || {Id, Pid, worker, _Modules} <- supervisor:which_children(logplex_redis_buffer_sup)]
  +            end || Url <- Removed],
  +            populate_info_table(),
  +            {noreply, State#state{urls=NewList}}
  +    end;
  +
   handle_cast(_Msg, State) ->
       {noreply, State}.
   
  
positive.code: %%--------------------------------------------------------------------
  %%% Internal functions
  %%--------------------------------------------------------------------
  
negative.code: %%--------------------------------------------------------------------
  init([]) ->
      io:format("init ~p~n", [?MODULE]),
      Urls = lookup_urls(),
  
      [logplex_sup:start_child(logplex_read_queue_sup, [Url]) || Url <- Urls],
      [logplex_sup:start_child(logplex_redis_buffer_sup, [Url]) || Url <- Urls],
  
      ets:new(logplex_shard_info, [protected, set, named_table]),
  
      populate_info_table(),
  
      spawn_link(fun poll_shard_urls/0),
  
      {ok, #state{urls=Urls}}.
  
  %%--------------------------------------------------------------------
  