Created
May 31, 2019 08:33
-
-
Save vmarcinko/21f53b06f34f84d9c8f5d5b4f92be564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EventListener(OnGrantedEvent.class) | |
public void onGrantedEvent() { | |
logger.info("Granted leadership"); | |
startProcessingTask(); | |
} | |
@EventListener(OnRevokedEvent.class) | |
public void onRevokedEvent() { | |
logger.info("Revoked leadership"); | |
stopProcessingTask(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment