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