public static NodeID getSeniorClusterMember() {
        byte[] clusterMemberID = CacheFactory.getSeniorClusterMemberID();
        if (clusterMemberID == null) {
            return XMPPServer.getInstance().getNodeID();
        }
        return NodeID.getInstance(clusterMemberID);
    }
Returns the id of the node that is the senior cluster member. When not in a cluster the returned
node id will be the {@link XMPPServer#getNodeID()}.

@return the id of the node that is the senior cluster member.
xmppserver/src/main/java/org/jivesoftware/openfire/cluster/ClusterManager.java