i3wangyi commented on a change in pull request #638: Decouple the event type
and the scheduled rebalance cache refresh option.
URL: https://github.com/apache/helix/pull/638#discussion_r354595128
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -220,17 +222,29 @@ public GenericHelixController(String clusterName,
Set<Pipeline.Type> enabledPipe
class RebalanceTask extends TimerTask {
final HelixManager _manager;
final ClusterEventType _clusterEventType;
+ private final Optional<Boolean> _shouldRefreshCacheOption;
private long _nextRebalanceTime;
public RebalanceTask(HelixManager manager, ClusterEventType
clusterEventType) {
this(manager, clusterEventType, -1);
+ }
+ public RebalanceTask(HelixManager manager, ClusterEventType
clusterEventType,
+ long nextRebalanceTime) {
+ this(manager, clusterEventType, nextRebalanceTime, Optional.empty());
}
- public RebalanceTask(HelixManager manager, ClusterEventType
clusterEventType, long nextRebalanceTime) {
+ public RebalanceTask(HelixManager manager, ClusterEventType
clusterEventType,
+ long nextRebalanceTime, boolean shouldRefreshCache) {
+ this(manager, clusterEventType, nextRebalanceTime,
Optional.of(shouldRefreshCache));
+ }
+
+ private RebalanceTask(HelixManager manager, ClusterEventType
clusterEventType,
Review comment:
The private constructor is not needed if you simply init the value in-line `
private final Optional<Boolean> _shouldRefreshCacheOption = Optional.empty();`,
right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]