public interface Term
Each time a leader is elected in a group, it's elected for a unique, monotonically increasing term.
The elected leader will persist until it becomes disconnected from the cluster or explicitly leaves the group.
long term()
The returned term number is guaranteed to be unique to this instance throughout the lifetime of the group and is guaranteed to be greater than all prior terms (monotonically increasing).
GroupMember leader()
If no leader has been elected for the term, the returned leader will be null. Once a leader has been
elected, the leader is guaranteed to persist for the remainder of this term until the leader either leaves the
group or becomes disconnected from the cluster.
null if no leader has been elected yet.Copyright © 2013–2017. All rights reserved.