/**
   * @param topVer Topology version to finish.
   * @return Finish update future.
   */
  @SuppressWarnings("unchecked")
  public IgniteInternalFuture<?> finishAtomicUpdates(AffinityTopologyVersion topVer) {
    GridCompoundFuture<Object, Object> res = new GridCompoundFuture<>();

    res.ignoreChildFailures(
        ClusterTopologyCheckedException.class, CachePartialUpdateCheckedException.class);

    for (GridCacheAtomicFuture<?> fut : atomicFuts.values()) {
      IgniteInternalFuture<Void> complete = fut.completeFuture(topVer);

      if (complete != null) res.add((IgniteInternalFuture) complete);
    }

    res.markInitialized();

    return res;
  }