Skip to content

Commit

Permalink
Remove not used GenericManagerFactory from DMN engine + change some u…
Browse files Browse the repository at this point in the history
…sages of deprecated code
  • Loading branch information
filiphr committed Aug 9, 2023
1 parent cc45310 commit 797577e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Interface representing a paginated request object, use when paging is needed without using URL-parameters.
*
* @see AbstractPaginateList
* @see PaginateListUtil
*
* @author Frederik Heremans
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
package org.flowable.eventregistry.spring.management;

import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Date;
Expand All @@ -28,8 +29,8 @@
*/
public class DefaultSpringEventRegistryChangeDetectionExecutor implements EventRegistryChangeDetectionExecutor, DisposableBean {

protected long initialDelayInMs;
protected long delayInMs;
protected Duration initialDelay;
protected Duration delay;
protected TaskScheduler taskScheduler;
protected ThreadPoolTaskScheduler threadPoolTaskScheduler; // If non-null, it means the scheduler has been created in this class

Expand All @@ -40,8 +41,8 @@ public DefaultSpringEventRegistryChangeDetectionExecutor(long initialDelayInMs,
}

public DefaultSpringEventRegistryChangeDetectionExecutor(long initialDelayInMs, long delayInMs, TaskScheduler taskScheduler) {
this.initialDelayInMs = initialDelayInMs;
this.delayInMs = delayInMs;
this.initialDelay = Duration.ofMillis(initialDelayInMs);
this.delay = Duration.ofMillis(delayInMs);

if (taskScheduler != null) {
this.taskScheduler = taskScheduler;
Expand All @@ -64,9 +65,8 @@ public void initialize() {
threadPoolTaskScheduler.initialize();
}

Instant initialInstant = Instant.now().plus(initialDelayInMs, ChronoUnit.MILLIS);
// Note we cannot use the method with the Instant since it was added in Spring 5.0, and we still want to support 4.3
taskScheduler.scheduleWithFixedDelay(createChangeDetectionRunnable(), Date.from(initialInstant), delayInMs);
Instant initialInstant = Instant.now().plus(initialDelay);
taskScheduler.scheduleWithFixedDelay(createChangeDetectionRunnable(), initialInstant, delay);
}

protected Runnable createChangeDetectionRunnable() {
Expand Down

0 comments on commit 797577e

Please sign in to comment.