INT-4246: Revoke leader when lock isn't acquired

JIRA: https://jira.spring.io/browse/INT-4246

The `LockRegistryLeaderInitiator` currently does not revoke leadership
when leading instance is unable to acquire lock from the underlying lock.
This can result in multiple `LockRegistryLeaderInitiator` instances becoming
 leaders in the exceptional situations such as lock timeouts.

* Handle leadership revoking when leading `LockRegistryLeaderInitiator`
is unable to acquire lock

Polish javadoc

**Cherry-pick to master**

Conflicts:
	spring-integration-core/src/main/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiator.java
	spring-integration-core/src/test/java/org/springframework/integration/support/leader/LockRegistryLeaderInitiatorTests.java

* Stop initiators in the end of test
This commit is contained in:
Vedran Pavic
2017-03-23 00:18:33 +01:00
committed by Artem Bilan
parent 6616242831
commit fb7e4d6869
5 changed files with 104 additions and 39 deletions

View File

@@ -44,7 +44,7 @@ import org.springframework.util.Assert;
*
* @author Dave Syer
* @author Artem Bilan
* @author Vedran Pavić
* @author Vedran Pavic
*
* @since 4.3
*/