code: private boolean checkFailover() throws InterruptedException {
      boolean isPrimary = isPrimaryServiceCached();
      if (!isPrimary && isPrimaryService()) {
        this.servicePair.setPrimaryOfferService(this);
        return true;
      }
      return false;
    }
docs: Determines whether a failover has happened and accordingly takes the
  appropriate action.
  @return whether or not failover happened