use of io.zeebe.transport.ServerOutput 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.transport.ServerOutput in project zeebe by zeebe-io.
the class SystemPartitionManager method addSystemPartition.
public void addSystemPartition(LogStream logStream, ServiceName<LogStream> serviceName) {
Loggers.SYSTEM_LOGGER.debug("Add system partiton");
final ServerOutput serverOutput = clientApiTransport.getOutput();
final TypedStreamEnvironment streamEnvironment = new TypedStreamEnvironment(logStream, serverOutput);
installCreateTopicProcessor(serviceName, streamEnvironment);
installPartitionCollectorProcessor(serviceName, serverOutput, streamEnvironment);
}
Aggregations