rpuch commented on code in PR #2228:
URL: https://github.com/apache/ignite-3/pull/2228#discussion_r1238396993


##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogServiceImpl.java:
##########
@@ -130,24 +132,32 @@ public class CatalogServiceImpl extends 
Producer<CatalogEvent, CatalogEventParam
 
     private final PendingComparableValuesTracker<Integer, Void> versionTracker 
= new PendingComparableValuesTracker<>(0);
 
-    private final HybridClock clock;
+    private final ClockWaiter clockWaiter;
 
-    private final long delayDurationMs;
+    private final Lazy<Long> delayDurationMs;
 
     /**
      * Constructor.
      */
-    public CatalogServiceImpl(UpdateLog updateLog, HybridClock clock) {
-        this(updateLog, clock, DEFAULT_DELAY_DURATION);
+    public CatalogServiceImpl(UpdateLog updateLog, ClockWaiter clockWaiter) {
+        this(updateLog, clockWaiter, DEFAULT_DELAY_DURATION);
     }
 
     /**
      * Constructor.
      */
-    public CatalogServiceImpl(UpdateLog updateLog, HybridClock clock, long 
delayDurationMs) {
+    CatalogServiceImpl(UpdateLog updateLog, ClockWaiter clockWaiter, long 
delayDurationMs) {
+        this(updateLog, clockWaiter, () -> delayDurationMs);
+    }
+
+    /**
+     * Constructor.
+     */
+    public CatalogServiceImpl(UpdateLog updateLog, ClockWaiter clockWaiter, 
LongSupplier delayDurationMsSupplier) {

Review Comment:
   After `Lazy` has been removed, it became more naturally to use 
`LongSupplier` (as `Supplier<Long>` is not used anymore)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to