Class TaskBasedCollector
java.lang.Object
com.sap.cds.services.impl.outbox.persistence.collectors.TaskBasedCollector
- All Implemented Interfaces:
OutboxCollector
Outbox collector implementation based on
TaskScheduler.-
Constructor Summary
ConstructorsConstructorDescriptionTaskBasedCollector(CdsRuntime runtime, PersistentOutbox outboxService, CdsProperties.Outbox.OutboxServiceConfig config, String appVersion, TaskScheduler taskScheduler, TelemetryData telemetryData) -
Method Summary
-
Constructor Details
-
TaskBasedCollector
public TaskBasedCollector(CdsRuntime runtime, PersistentOutbox outboxService, CdsProperties.Outbox.OutboxServiceConfig config, String appVersion, TaskScheduler taskScheduler, TelemetryData telemetryData)
-
-
Method Details
-
start
public void start()Description copied from interface:OutboxCollectorStarts the collector- Specified by:
startin interfaceOutboxCollector
-
stop
public void stop(long waitMillis) Description copied from interface:OutboxCollectorStops the collector- Specified by:
stopin interfaceOutboxCollector- Parameters:
waitMillis- millis to wait for a stopped collector.
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceOutboxCollector- Returns:
- true, if the collector is currently running
-
schedule
Description copied from interface:OutboxCollectorSchedules the collector execution for the given tenant- Specified by:
schedulein interfaceOutboxCollector- Parameters:
tenant- the tenantdelay- the delay in milliswithEmptyCheck- checks if empty before scheduling
-