Search in sources :

Example 6 with ActorScheduler

use of io.zeebe.util.sched.ActorScheduler in project zeebe by zeebe-io.

the class StreamProcessorService method start.

@Override
public void start(ServiceStartContext ctx) {
    final LogStream logStream = logStreamInjector.getValue();
    final SnapshotStorage snapshotStorage = snapshotStorageInjector.getValue();
    final ActorScheduler actorScheduler = ctx.getScheduler();
    MetadataFilter metadataFilter = versionFilter;
    if (customEventFilter != null) {
        metadataFilter = metadataFilter.and(customEventFilter);
    }
    final EventFilter eventFilter = new MetadataEventFilter(metadataFilter);
    streamProcessorController = LogStreams.createStreamProcessor(name, id, streamProcessor).logStream(logStream).snapshotStorage(snapshotStorage).snapshotPeriod(Duration.ofMinutes(15)).actorScheduler(actorScheduler).eventFilter(eventFilter).readOnly(readOnly).build();
    ctx.async(streamProcessorController.openAsync());
}
Also used : ActorScheduler(io.zeebe.util.sched.ActorScheduler) SnapshotStorage(io.zeebe.logstreams.spi.SnapshotStorage) LogStream(io.zeebe.logstreams.log.LogStream)

Example 7 with ActorScheduler

use of io.zeebe.util.sched.ActorScheduler in project zeebe by zeebe-io.

the class ClientTransportService method start.

@Override
public void start(ServiceStartContext startContext) {
    final Dispatcher sendBuffer = sendBufferInjector.getValue();
    final ActorScheduler scheduler = startContext.getScheduler();
    final ClientTransportBuilder transportBuilder = Transports.newClientTransport();
    transport = transportBuilder.sendBuffer(sendBuffer).requestPoolSize(requestPoolSize).scheduler(scheduler).build();
    if (defaultEndpoints != null) {
        // make transport open and manage channels to the default endpoints
        defaultEndpoints.forEach(s -> transport.registerRemoteAddress(s));
    }
}
Also used : ActorScheduler(io.zeebe.util.sched.ActorScheduler) Dispatcher(io.zeebe.dispatcher.Dispatcher)

Example 8 with ActorScheduler

use of io.zeebe.util.sched.ActorScheduler in project zeebe by zeebe-io.

the class ServerTransportService method start.

@Override
public void start(ServiceStartContext serviceContext) {
    final ActorScheduler scheduler = serviceContext.getScheduler();
    final Dispatcher sendBuffer = sendBufferInjector.getValue();
    final ServerRequestHandler requestHandler = requestHandlerInjector.getValue();
    final ServerMessageHandler messageHandler = messageHandlerInjector.getValue();
    serverTransport = Transports.newServerTransport().name(readableName).bindAddress(bindAddress).sendBuffer(sendBuffer).scheduler(scheduler).build(messageHandler, requestHandler);
    LOG.info("Bound {} to {}", readableName, bindAddress);
}
Also used : ActorScheduler(io.zeebe.util.sched.ActorScheduler) Dispatcher(io.zeebe.dispatcher.Dispatcher)

Aggregations

ActorScheduler (io.zeebe.util.sched.ActorScheduler)8 Dispatcher (io.zeebe.dispatcher.Dispatcher)4 ServerTransport (io.zeebe.transport.ServerTransport)2 RequestTopologyHandler (io.zeebe.broker.clustering.handler.RequestTopologyHandler)1 ClusterManagerContext (io.zeebe.broker.clustering.management.ClusterManagerContext)1 RemoveTopicSubscriptionHandler (io.zeebe.broker.event.handler.RemoveTopicSubscriptionHandler)1 TopicSubscriptionService (io.zeebe.broker.event.processor.TopicSubscriptionService)1 LogStreamsManager (io.zeebe.broker.logstreams.LogStreamsManager)1 WorkflowRequestMessageHandler (io.zeebe.broker.system.deployment.handler.WorkflowRequestMessageHandler)1 RequestPartitionsMessageHandler (io.zeebe.broker.system.log.RequestPartitionsMessageHandler)1 SystemPartitionManager (io.zeebe.broker.system.log.SystemPartitionManager)1 TaskSubscriptionManager (io.zeebe.broker.task.TaskSubscriptionManager)1 LogStream (io.zeebe.logstreams.log.LogStream)1 SnapshotStorage (io.zeebe.logstreams.spi.SnapshotStorage)1 BufferingServerTransport (io.zeebe.transport.BufferingServerTransport)1 ClientTransport (io.zeebe.transport.ClientTransport)1 ServerOutput (io.zeebe.transport.ServerOutput)1 MetricsManager (io.zeebe.util.metrics.MetricsManager)1 File (java.io.File)1