':param reactor: See ``ControlServiceLocator.__init__``.
:param ClusterStateService cluster_state: Object that records known
cluster state.
:param ConfigurationPersistenceService configuration_service:
Persistence service for desired cluster configuration.
:param endpoint: Endpoint to listen on.
:param context_factory: TLS context factory.'

def __init__(self, reactor, cluster_state, configuration_service, endpoint, context_factory):

    self._connections = set()
    self._reactor = reactor
    self._connections_pending_update = set()
    self._current_pending_update_delayed_call = None
    self._current_command = {}
    self._last_received_generation = defaultdict((lambda : _ConfigAndStateGeneration()))
    self._configuration_generation_tracker = GenerationTracker(100)
    self._state_generation_tracker = GenerationTracker(100)
    self.cluster_state = cluster_state
    self.configuration_service = configuration_service
    self.endpoint_service = StreamServerEndpointService(endpoint, TLSMemoryBIOFactory(context_factory, False, ServerFactory.forProtocol((lambda : ControlAMP(reactor, self)))))
    self.configuration_service.register(self._schedule_broadcast_update)
