use of io.zeebe.broker.system.deployment.service.DeploymentManager in project zeebe by zeebe-io.
the class SystemComponent method init.
@Override
public void init(SystemContext context) {
final ServiceContainer serviceContainer = context.getServiceContainer();
final MetricsFileWriterService metricsFileWriterService = new MetricsFileWriterService(context.getConfigurationManager().readEntry("metrics", MetricsCfg.class));
serviceContainer.createService(METRICS_FILE_WRITER, metricsFileWriterService).install();
final SystemConfiguration systemConfiguration = context.getConfigurationManager().readEntry("system", SystemConfiguration.class);
final PartitionManagerService partitionManagerService = new PartitionManagerService();
serviceContainer.createService(SystemServiceNames.PARTITION_MANAGER_SERVICE, partitionManagerService).dependency(ClusterServiceNames.MEMBER_LIST_SERVICE, partitionManagerService.getMemberListServiceInjector()).dependency(TransportServiceNames.clientTransport(TransportServiceNames.MANAGEMENT_API_CLIENT_NAME), partitionManagerService.getManagementClientInjector()).install();
final SystemPartitionManager systemPartitionManager = new SystemPartitionManager(systemConfiguration);
serviceContainer.createService(SystemServiceNames.SYSTEM_LOG_MANAGER, systemPartitionManager).dependency(TransportServiceNames.serverTransport(TransportServiceNames.CLIENT_API_SERVER_NAME), systemPartitionManager.getClientApiTransportInjector()).dependency(PARTITION_MANAGER_SERVICE, systemPartitionManager.getPartitionManagerInjector()).groupReference(LogStreamServiceNames.SYSTEM_STREAM_GROUP, systemPartitionManager.getLogStreamsGroupReference()).install();
final DeploymentManager deploymentManagerService = new DeploymentManager(systemConfiguration);
serviceContainer.createService(SystemServiceNames.DEPLOYMENT_MANAGER_SERVICE, deploymentManagerService).dependency(TransportServiceNames.clientTransport(TransportServiceNames.MANAGEMENT_API_CLIENT_NAME), deploymentManagerService.getManagementClientInjector()).dependency(TransportServiceNames.serverTransport(TransportServiceNames.CLIENT_API_SERVER_NAME), deploymentManagerService.getClientApiTransportInjector()).dependency(PARTITION_MANAGER_SERVICE, deploymentManagerService.getPartitionManagerInjector()).groupReference(LogStreamServiceNames.SYSTEM_STREAM_GROUP, deploymentManagerService.getSystemStreamGroupReference()).install();
final WorkflowRequestMessageHandlerService workflowRequestHandlerService = new WorkflowRequestMessageHandlerService();
serviceContainer.createService(WORKFLOW_REQUEST_MESSAGE_HANDLER_SERVICE, workflowRequestHandlerService).groupReference(LogStreamServiceNames.WORKFLOW_STREAM_GROUP, workflowRequestHandlerService.getLogStreamsGroupReference()).install();
}
Aggregations