List of usage examples for org.springframework.integration.leader Candidate getRole
String getRole();
From source file:org.springframework.integration.etcd.leader.LeaderInitiator.java
/** * Construct a {@link LeaderInitiator}.//from w w w .j a va 2s. c om * @param client {@link EtcdClient} instance * @param candidate leadership election candidate * @param namespace Etcd namespace */ public LeaderInitiator(EtcdClient client, Candidate candidate, String namespace) { Assert.notNull(client, "'etcdClient' must not be null"); Assert.notNull(candidate, "'candidate' must not be null"); this.client = client; this.candidate = candidate; this.context = new EtcdContext(); this.baseEtcdPath = (namespace == null ? DEFAULT_NAMESPACE : namespace) + "/" + candidate.getRole(); }