public class DefaultLeaderEventPublisher extends Object implements LeaderEventPublisher, ApplicationEventPublisherAware
LeaderEventPublisher.| Constructor and Description |
|---|
DefaultLeaderEventPublisher()
Instantiates a new leader event publisher.
|
DefaultLeaderEventPublisher(ApplicationEventPublisher applicationEventPublisher)
Instantiates a new leader event publisher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
publishOnFailedToAcquire(Object source,
Context context,
String role)
Publish a failure to acquire event.
|
void |
publishOnGranted(Object source,
Context context,
String role)
Publish a granted event.
|
void |
publishOnRevoked(Object source,
Context context,
String role)
Publish a revoked event.
|
void |
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) |
public DefaultLeaderEventPublisher()
public DefaultLeaderEventPublisher(ApplicationEventPublisher applicationEventPublisher)
applicationEventPublisher - the application event publisherpublic void publishOnGranted(Object source, Context context, String role)
LeaderEventPublisherpublishOnGranted in interface LeaderEventPublishersource - the component generated this eventcontext - the context associated with eventrole - the role of the leaderpublic void publishOnRevoked(Object source, Context context, String role)
LeaderEventPublisherpublishOnRevoked in interface LeaderEventPublishersource - the component generated this eventcontext - the context associated with eventrole - the role of the leaderpublic void publishOnFailedToAcquire(Object source, Context context, String role)
LeaderEventPublisherpublishOnFailedToAcquire in interface LeaderEventPublishersource - the component generated this eventcontext - the context associated with eventrole - the role of the leaderpublic void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAware