[Java] Save second lookup of volatile activeTermId when rotating publications.