GrantPSpencer commented on code in PR #2932:
URL: https://github.com/apache/helix/pull/2932#discussion_r1851147315
##########
helix-core/src/main/java/org/apache/helix/model/ClusterConfig.java:
##########
@@ -1255,4 +1257,22 @@ public void setPreferredScoringKeys(List<String>
preferredScoringKeys) {
_record.setListField(ClusterConfigProperty.PREFERRED_SCORING_KEYS.name(),
preferredScoringKeys);
}
+
+ public boolean isParticipantDeregistrationEnabled() {
+ return
_record.getBooleanField(ClusterConfigProperty.PARTICIPANT_DEREGISTRATION_ENABLED.name(),
+ false);
+ }
+
+ public void setParticipantDeregistrationEnabled(boolean enabled) {
+
_record.setBooleanField(ClusterConfigProperty.PARTICIPANT_DEREGISTRATION_ENABLED.name(),
enabled);
+ }
+
+ public long getParticipantDeregistrationTimeout() {
+ return
_record.getLongField(ClusterConfigProperty.PARTICIPANT_DEREGISTRATION_TIMEOUT.name(),
+ -1);
+ }
+
+ public void setParticipantDeregistrationTimeout(long timeout) {
+
_record.setLongField(ClusterConfigProperty.PARTICIPANT_DEREGISTRATION_TIMEOUT.name(),
timeout);
+ }
Review Comment:
Adjusted to only rely on the timeout value. If timeout is -1 or lower, then
it is turned off. If there is no timeout set, the default value is -1 which is
interpreted as disabled
--
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]