Search in sources :

Example 1 with SystemPartitionManager

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());
}
Also used : ServerOutput(io.zeebe.transport.ServerOutput) ServerTransport(io.zeebe.transport.ServerTransport) TopicSubscriptionService(io.zeebe.broker.event.processor.TopicSubscriptionService) RemoveTopicSubscriptionHandler(io.zeebe.broker.event.handler.RemoveTopicSubscriptionHandler) SystemPartitionManager(io.zeebe.broker.system.log.SystemPartitionManager) Dispatcher(io.zeebe.dispatcher.Dispatcher) TaskSubscriptionManager(io.zeebe.broker.task.TaskSubscriptionManager) RequestPartitionsMessageHandler(io.zeebe.broker.system.log.RequestPartitionsMessageHandler) RequestTopologyHandler(io.zeebe.broker.clustering.handler.RequestTopologyHandler) ActorScheduler(io.zeebe.util.sched.ActorScheduler)

Example 2 with SystemPartitionManager

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();
}
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

SystemPartitionManager (io.zeebe.broker.system.log.SystemPartitionManager)2 RequestTopologyHandler (io.zeebe.broker.clustering.handler.RequestTopologyHandler)1 RemoveTopicSubscriptionHandler (io.zeebe.broker.event.handler.RemoveTopicSubscriptionHandler)1 TopicSubscriptionService (io.zeebe.broker.event.processor.TopicSubscriptionService)1 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 RequestPartitionsMessageHandler (io.zeebe.broker.system.log.RequestPartitionsMessageHandler)1 MetricsFileWriterService (io.zeebe.broker.system.metrics.MetricsFileWriterService)1 MetricsCfg (io.zeebe.broker.system.metrics.cfg.MetricsCfg)1 TaskSubscriptionManager (io.zeebe.broker.task.TaskSubscriptionManager)1 Dispatcher (io.zeebe.dispatcher.Dispatcher)1 ServiceContainer (io.zeebe.servicecontainer.ServiceContainer)1 ServerOutput (io.zeebe.transport.ServerOutput)1 ServerTransport (io.zeebe.transport.ServerTransport)1 ActorScheduler (io.zeebe.util.sched.ActorScheduler)1