use of io.zeebe.broker.system.log.SystemPartitionManager in project zeebe by zeebe-io.
the class ControlMessageHandlerManagerService method start.
@Override
public void start(ServiceStartContext context) {
final Dispatcher controlMessageBuffer = controlMessageBufferInjector.getValue();
final ServerTransport transport = transportInjector.getValue();
final ActorScheduler actorScheduler = context.getScheduler();
final TaskSubscriptionManager taskSubscriptionManager = taskSubscriptionManagerInjector.getValue();
final TopicSubscriptionService topicSubscriptionService = topicSubscriptionServiceInjector.getValue();
final SystemPartitionManager systemPartitionManager = systemPartitionManagerInjector.getValue();
final ServerOutput output = transport.getOutput();
final List<ControlMessageHandler> controlMessageHandlers = Arrays.asList(new AddTaskSubscriptionHandler(output, taskSubscriptionManager), new IncreaseTaskSubscriptionCreditsHandler(output, taskSubscriptionManager), new RemoveTaskSubscriptionHandler(output, taskSubscriptionManager), new RemoveTopicSubscriptionHandler(output, topicSubscriptionService), new RequestTopologyHandler(output, clusterManagerInjector.getValue()), new RequestPartitionsMessageHandler(output, systemPartitionManager));
service = new ControlMessageHandlerManager(transport.getOutput(), controlMessageBuffer, controlMessageRequestTimeoutInMillis, actorScheduler, controlMessageHandlers);
context.async(service.openAsync());
}
use of io.zeebe.broker.system.log.SystemPartitionManager 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