rishabhdaim commented on code in PR #2842:
URL: https://github.com/apache/jackrabbit-oak/pull/2842#discussion_r3071687337


##########
oak-core-spi/src/main/java/org/apache/jackrabbit/oak/cache/api/CacheBuilder.java:
##########
@@ -171,6 +173,19 @@ public CacheBuilder<K, V> refreshAfterWrite(@NotNull 
Duration duration) {
         return this;
     }
 
+    /**
+     * Sets the nanosecond ticker used to measure time for expiry and refresh.
+     * Intended for testing with a controllable clock.
+     *
+     * @param ticker a supplier returning the current time in nanoseconds 
(must not be null)
+     * @return this builder
+     */
+    @NotNull
+    public CacheBuilder<K, V> ticker(@NotNull Supplier<Long> ticker) {

Review Comment:
   will add this in next PR.



-- 
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