frankgh commented on code in PR #172:
URL: https://github.com/apache/cassandra-sidecar/pull/172#discussion_r1910682302


##########
server/src/main/java/org/apache/cassandra/sidecar/config/yaml/CacheConfigurationImpl.java:
##########
@@ -41,34 +46,50 @@ public class CacheConfigurationImpl implements 
CacheConfiguration
     @JsonProperty("warmup_retries")
     protected final int warmupRetries;
 
-    @JsonProperty("warmup_retry_interval_millis")
-    protected final long warmupRetryIntervalMillis;
+    protected MillisecondBoundConfiguration warmupRetryInterval;
 
     public CacheConfigurationImpl()
     {
-        this(TimeUnit.HOURS.toMillis(1), 100, true, 5, 1000);
+        this(MillisecondBoundConfiguration.parse("1h"), 100, true, 5, 
MillisecondBoundConfiguration.parse("60s"));
     }
 
     @VisibleForTesting
-    public CacheConfigurationImpl(long expireAfterAccessMillis, long 
maximumSize)
+    public CacheConfigurationImpl(MillisecondBoundConfiguration 
expireAfterAccess, long maximumSize)
     {
-        this(expireAfterAccessMillis, maximumSize, true, 5, 1000);
+        this(expireAfterAccess, maximumSize, true, 5, 
MillisecondBoundConfiguration.parse("60s"));
     }
 
-    public CacheConfigurationImpl(long expireAfterAccessMillis, long 
maximumSize, boolean enabled, int warmupRetries, long warmupRetryIntervalMillis)
+    public CacheConfigurationImpl(MillisecondBoundConfiguration 
expireAfterAccess,
+                                  long maximumSize,
+                                  boolean enabled,
+                                  int warmupRetries,
+                                  MillisecondBoundConfiguration 
warmupRetryInterval)
     {
-        this.expireAfterAccessMillis = expireAfterAccessMillis;
+        this.expireAfterAccess = expireAfterAccess;
         this.maximumSize = maximumSize;
         this.enabled = enabled;
         this.warmupRetries = warmupRetries;
-        this.warmupRetryIntervalMillis = warmupRetryIntervalMillis;
+        this.warmupRetryInterval = warmupRetryInterval;
     }
 
     @Override
+    @JsonProperty("expire_after_access")
+    public MillisecondBoundConfiguration expireAfterAccess()
+    {
+        return expireAfterAccess;
+    }
+
+    @JsonProperty("expire_after_access")
+    public void setExpireAfterAccess(MillisecondBoundConfiguration 
expireAfterAccess)
+    {
+        this.expireAfterAccess = expireAfterAccess;
+    }
+
     @JsonProperty("expire_after_access_millis")
-    public long expireAfterAccessMillis()
+    public void setExpireAfterAccessMillis(long expireAfterAccessMillis)

Review Comment:
   We can't assume no one is using Sidecar in the open source, so I think to be 
on the safe side and play well with open source, we should do the work to be 
backwards compatible.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to