Search in sources :

Example 1 with TaskExpireLockStreamProcessor

use of io.zeebe.broker.task.processor.TaskExpireLockStreamProcessor in project zeebe by zeebe-io.

the class TaskQueueManagerService method startExpireLockService.

protected void startExpireLockService(ServiceName<LogStream> logStreamServiceName, LogStream stream, TypedStreamEnvironment env) {
    final ServiceName<StreamProcessorController> expireLockStreamProcessorServiceName = taskQueueExpireLockStreamProcessorServiceName(stream.getLogName());
    final TaskExpireLockStreamProcessor expireLockStreamProcessor = new TaskExpireLockStreamProcessor(env.buildStreamReader(), env.buildStreamWriter());
    final TypedStreamProcessor streamProcessor = expireLockStreamProcessor.createStreamProcessor(env);
    final StreamProcessorService expireLockStreamProcessorService = new StreamProcessorService(expireLockStreamProcessorServiceName.getName(), TASK_EXPIRE_LOCK_STREAM_PROCESSOR_ID, streamProcessor).eventFilter(streamProcessor.buildTypeFilter());
    serviceContext.createService(expireLockStreamProcessorServiceName, expireLockStreamProcessorService).dependency(logStreamServiceName, expireLockStreamProcessorService.getLogStreamInjector()).dependency(SNAPSHOT_STORAGE_SERVICE, expireLockStreamProcessorService.getSnapshotStorageInjector()).install();
}
Also used : StreamProcessorController(io.zeebe.logstreams.processor.StreamProcessorController) TypedStreamProcessor(io.zeebe.broker.logstreams.processor.TypedStreamProcessor) StreamProcessorService(io.zeebe.broker.logstreams.processor.StreamProcessorService) TaskExpireLockStreamProcessor(io.zeebe.broker.task.processor.TaskExpireLockStreamProcessor)

Aggregations

StreamProcessorService (io.zeebe.broker.logstreams.processor.StreamProcessorService)1 TypedStreamProcessor (io.zeebe.broker.logstreams.processor.TypedStreamProcessor)1 TaskExpireLockStreamProcessor (io.zeebe.broker.task.processor.TaskExpireLockStreamProcessor)1 StreamProcessorController (io.zeebe.logstreams.processor.StreamProcessorController)1