Search in sources :

Example 1 with MetricsFileWriterService

use of io.zeebe.broker.system.metrics.MetricsFileWriterService 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();
}
Also used : ServiceContainer(io.zeebe.servicecontainer.ServiceContainer) WorkflowRequestMessageHandlerService(io.zeebe.broker.system.deployment.service.WorkflowRequestMessageHandlerService) DeploymentManager(io.zeebe.broker.system.deployment.service.DeploymentManager) PartitionManagerService(io.zeebe.broker.system.log.PartitionManagerService) SystemPartitionManager(io.zeebe.broker.system.log.SystemPartitionManager) MetricsCfg(io.zeebe.broker.system.metrics.cfg.MetricsCfg) MetricsFileWriterService(io.zeebe.broker.system.metrics.MetricsFileWriterService)

Aggregations

DeploymentManager (io.zeebe.broker.system.deployment.service.DeploymentManager)1 WorkflowRequestMessageHandlerService (io.zeebe.broker.system.deployment.service.WorkflowRequestMessageHandlerService)1 PartitionManagerService (io.zeebe.broker.system.log.PartitionManagerService)1 SystemPartitionManager (io.zeebe.broker.system.log.SystemPartitionManager)1 MetricsFileWriterService (io.zeebe.broker.system.metrics.MetricsFileWriterService)1 MetricsCfg (io.zeebe.broker.system.metrics.cfg.MetricsCfg)1 ServiceContainer (io.zeebe.servicecontainer.ServiceContainer)1