Skip to content

Commit

Permalink
Add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lbwexler committed Jan 28, 2025
1 parent b54e21f commit 776036d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion grails-app/init/io/xh/hoist/ClusterConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ class ClusterConfig {
* Hoist Core's `ClientErrorService` for an example.
*/
protected void createDefaultConfigs(Config config) {
config.setProperty('hazelcast.shutdownhook.enabled', 'false')

config.setProperty('hazelcast.logging.type', 'slf4j')

// Hoist core will orchestrate hz shutdown from its own hook: See HoistCoreGrailsPlugin
config.setProperty('hazelcast.shutdownhook.enabled', 'false')

config.getMapConfig('default').with {
statisticsEnabled = true
inMemoryFormat = InMemoryFormat.OBJECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ class ClusterService extends BaseService implements ApplicationListener<Applicat
* Shutdown this instance.
*/
void shutdownInstance() {
logInfo("Initiating shutdown via System.exit.")
logInfo('Initiating shutdown via System.exit.')
System.exit(0)
}

Expand Down
1 change: 1 addition & 0 deletions src/main/groovy/io/xh/hoist/HoistCoreGrailsPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class HoistCoreGrailsPlugin extends Plugin {
void onConfigChange(Map<String, Object> event) {}

void onShutdown(Map<String, Object> event) {
// Orchestrate shutdown here. This is *after* all plugin and app Bootstrap.destroy() have run
Timer.shutdownAll()
ClusterService.shutdownHazelcast()
}
Expand Down

0 comments on commit 776036d

Please sign in to comment.