public ServiceRegistryInMemoryImpl(JobProducer service, float maxLoad, SecurityService securityService,
UserDirectoryService userDirectoryService, OrganizationDirectoryService organizationDirectoryService,
IncidentService incidentService) throws ServiceRegistryException {
registerHost(LOCALHOST, LOCALHOST, Runtime.getRuntime().totalMemory(), Runtime.getRuntime().availableProcessors(), maxLoad);
if (service != null)
registerService(service, maxLoad);
this.securityService = securityService;
this.userDirectoryService = userDirectoryService;
this.organizationDirectoryService = organizationDirectoryService;
this.incidents = new Incidents(this, incidentService);
this.dispatcher.scheduleWithFixedDelay(new JobDispatcher(), DEFAULT_DISPATCHER_TIMEOUT, DEFAULT_DISPATCHER_TIMEOUT,
TimeUnit.MILLISECONDS);
}