bharatviswa504 commented on issue #558: HDDS-1217. Refactor ChillMode rules and chillmode manager. URL: https://github.com/apache/hadoop/pull/558#issuecomment-474065559 > **ChillModeExitRule** > We can mandate the event handler adding logic of each and every ChillModeExitRule implementation by introducing an abstract `abstract TypedEvent<T> getEventType()` method in `ChillModeExitRule` class. Then we can make a call to this method from `ChillModeExitRule` constructor. This will mandate each and every rule to provide it's EventType and we can add its event handler in `ChillModeExitRule`. > > ``` > public ChillModeExitRule(SCMChillModeManager chillModeManager, > String ruleName, EventQueue eventQueue) { > this.chillModeManager = chillModeManager; > this.ruleName = ruleName; > eventQueue.addHandler(getEventType(), this); > } > ``` Done
---------------------------------------------------------------- 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]
