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