public class LocalLeader extends java.lang.Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Event listener for when a context is started up.
Before the application shuts down need to turn off leadership activities.
public LocalLeader(GenieEventBus genieEventBus, boolean isLeader)
genieEventBus- The spring application event publisher to use to invoke that this node is a leader
isLeader- Whether this node should be the leader or not. Should only be one in a cluster but not enforced by Genie at this time
@EventListener public void startLeadership(org.springframework.context.event.ContextRefreshedEvent event)
event- The Spring Boot application ready event to startup on
@EventListener public void stopLeadership(org.springframework.context.event.ContextClosedEvent event)
event- The application context closing event