code: void waitEpochAckFromQuorum()
        throws InterruptedException, TimeoutException {
      int ackCount = 0;
      // Waits the Ack from all other peers in the quorum set.
      while (ackCount < this.quorumMap.size()) {
        MessageTuple tuple = filter.getExpectedMessage(MessageType.ACK_EPOCH,
                                                       null,
                                                       config.getTimeoutMs());
        Message msg = tuple.getMessage();
        String source = tuple.getServerId();
        if (!this.quorumMap.containsKey(source)) {
          LOG.warn("The Epoch ACK comes from {} who is not in quorum set, "
                   + "possibly from previous epoch?",
                   source);
          continue;
        }
        ackCount++;
        ZabMessage.AckEpoch ackEpoch = msg.getAckEpoch();
        ZabMessage.Zxid zxid = ackEpoch.getLastZxid();
        // Updates follower's f.a and lastZxid.
        PeerHandler ph = this.quorumMap.get(source);
        ph.setLastAckedEpoch(ackEpoch.getAcknowledgedEpoch());
        ph.setLastZxid(MessageBuilder.fromProtoZxid(zxid));
      }
      LOG.debug("Received ACKs from the quorum set of size {}.",
                this.quorumMap.size() + 1);
    }
docs: Waits until the new epoch is established.
  
  @throws InterruptedException if anything wrong happens.
  @throws TimeoutException in case of timeout.