Class LeaderInitiator.HazelcastContext

java.lang.Object
org.springframework.integration.hazelcast.leader.LeaderInitiator.HazelcastContext
All Implemented Interfaces:
Context
Enclosing class:
LeaderInitiator

protected class LeaderInitiator.HazelcastContext extends Object implements Context
Implementation of leadership context backed by Hazelcast.
  • Constructor Details

    • HazelcastContext

      protected HazelcastContext()
  • Method Details

    • isLeader

      public boolean isLeader()
      Description copied from interface: Context
      Checks if the Candidate this context was passed to is the leader.
      Specified by:
      isLeader in interface Context
      Returns:
      true if the Candidate this context was passed to is the leader
    • yield

      public void yield()
      Description copied from interface: Context
      Causes the Candidate this context was passed to to relinquish leadership. This method has no effect if the candidate is not currently the leader.
      Specified by:
      yield in interface Context
    • getRole

      public String getRole()
      Description copied from interface: Context
      Get the role for the Candidate.
      Specified by:
      getRole in interface Context
      Returns:
      the role.
    • toString

      public String toString()
      Overrides:
      toString in class Object