nonbinaryprogrammer commented on a change in pull request #6961:
URL: https://github.com/apache/geode/pull/6961#discussion_r725202552
##########
File path:
geode-for-redis/src/main/java/org/apache/geode/redis/internal/PassiveExpirationManager.java
##########
@@ -38,14 +40,49 @@
private static final Logger logger = LogService.getLogger();
private final ScheduledExecutorService expirationExecutor;
+ private final int initialDelay;
+ private final int interval;
@VisibleForTesting
- public static final int INTERVAL = 3;
+ public static final int DEFAULT_REDIS_INITIAL_DELAY_MINUTES = 3;
+ @VisibleForTesting
+ public static final int DEFAULT_REDIS_INTERVAL_MINUTES = 3;
public PassiveExpirationManager(RegionProvider regionProvider) {
+ int tempTimeout;
+ try {
+ tempTimeout =
Integer.parseInt(System.getProperty(REDIS_INITIAL_DELAY_MINUTES));
+
+ if (tempTimeout < 0) {
+ tempTimeout = DEFAULT_REDIS_INITIAL_DELAY_MINUTES;
+ }
+ } catch (NumberFormatException e) {
+ tempTimeout = DEFAULT_REDIS_INITIAL_DELAY_MINUTES;
+ }
+ this.initialDelay = tempTimeout;
+
+ try {
+ tempTimeout =
Integer.parseInt(System.getProperty(REDIS_INTERVAL_MINUTES));
+
+ if (tempTimeout <= 0) {
+ tempTimeout = DEFAULT_REDIS_INTERVAL_MINUTES;
+ }
+ } catch (NumberFormatException e) {
+ tempTimeout = DEFAULT_REDIS_INTERVAL_MINUTES;
+ }
+ this.interval = tempTimeout;
+
Review comment:
oh that's cool, I didn't know about that
--
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]