anchor.diff:                  _ -> State
               end
       end.
  -%%     case Repeat of
  -%%         true -> plan_next_cluster_state_check();
  -%%         _ -> ?debug("Single cluster initialization ~p", [NewState])
  -%%     end,
  -
  -
  -%% init_cluster_nodes_dominance/6
  -%% ====================================================================
  -%% @doc Chooses node for workers when there are more nodes than workers.
  +
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Chooses node for workers when there are more nodes than workers.
  +%% @end
  +%%--------------------------------------------------------------------
   -spec init_cluster_nodes_dominance(State :: term(), Nodes :: list(), Jobs1 :: list(),
  -    Jobs2 :: list(), Args1 :: list(), Args2 :: list()) -> NewState when
  -    NewState :: term().
  -%% ====================================================================
  +                                   Jobs2 :: list(), Args1 :: list(), Args2 :: list()) -> NewState when
  +      NewState :: term().
   init_cluster_nodes_dominance(State, [], _Jobs1, _Jobs2, _Args1, _Args2) ->
       State;
   init_cluster_nodes_dominance(State, Nodes, [], Jobs2, [], Args2) ->
  
positive.code:     {noreply, State}.
  
  
  %% handle_info/2
  %% ====================================================================
  %% @doc <a href="http://www.erlang.org/doc/man/gen_server.html#Module:handle_info-2">gen_server:handle_info/2</a>
  -spec handle_info(Info :: timeout | term(), State :: term()) -> Result when
      Result :: {noreply, NewState}
      | {noreply, NewState, Timeout}
      | {noreply, NewState, hibernate}
      | {stop, Reason :: term(), NewState},
      NewState :: term(),
      Timeout :: non_neg_integer() | infinity.
  %% ====================================================================
  handle_info({timer, Msg}, State) ->
      gen_server:cast({global, ?CCM}, Msg),
      {noreply, State};
  
negative.code:     ?warning("CCM wrong info: ~p", [_Info]),
      {noreply, State}.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% This function is called by a gen_server when it is about to
  %% terminate. It should be the opposite of Module:init/1 and do any
  %% necessary cleaning up. When it returns, the gen_server terminates
  %% with Reason. The return value is ignored.
  %% @end
  %%--------------------------------------------------------------------
  -spec terminate(Reason, State :: term()) -> Any :: term() when
        Reason :: normal
                | shutdown
                | {shutdown, term()}
                | term().
  %% ====================================================================
  terminate(_Reason, _State) ->
      ok.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Convert process state when code is changed
  %% @end
  %%--------------------------------------------------------------------
  -spec code_change(OldVsn, State :: term(), Extra :: term()) -> Result when
        Result :: {ok, NewState :: term()} | {error, Reason :: term()},
        OldVsn :: Vsn | {down, Vsn},
        Vsn :: term().
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  %% ====================================================================
  %% Internal functions
  %% ====================================================================
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Handles calls used during tests
  %% @end
  %%--------------------------------------------------------------------
  -spec handle_test_call(Request :: term(), From :: {pid(), Tag :: term()}, State :: term()) -> Result :: term().
  -ifdef(TEST).
  handle_test_call({start_worker, Node, Module, WorkerArgs}, _From, State) ->
      {Ans, NewState} = start_worker(Node, Module, WorkerArgs, State),
      NewState2 = case Ans of
                      ok -> update_dispatchers_and_dns(NewState, true, true);
                      error -> NewState
                  end,
      {reply, Ans, NewState2};
  handle_test_call(check_state_loaded, _From, State) ->
      {reply, State#cm_state.state_loaded, State}.
  -else.
  handle_test_call(_Request, _From, State) ->
      {reply, not_supported_in_normal_mode, State}.
  -endif.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Triggers repeated cluster initialization.
  %% @end
  %%--------------------------------------------------------------------
  -spec init_cluster(State :: term()) -> NewState when
        NewState :: term().
  init_cluster(State) ->
      init_cluster(State, true).
  
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Initializes cluster - decides at which nodes components should
  %% be started (and starts them). Additionally, it sets timer that
  %% initiates checking of cluster state.
  %% @end
  %%--------------------------------------------------------------------
  -spec init_cluster(State :: term(), Repeat:: boolean()) -> NewState when
        NewState :: term().
  init_cluster(State = #cm_state{nodes = []}, false) ->
      State;
  init_cluster(State = #cm_state{nodes = []}, true) ->
  