private Set<ClusterNode> replicatedUnstableDataNodes(GridCacheContext<?,?> cctx){
  assert cctx.isReplicated() : cctx.name() + " must be replicated";
  String space=cctx.name();
  Set<ClusterNode> dataNodes=new HashSet<>(dataNodes(space,NONE));
  if (dataNodes.isEmpty())   throw new CacheException("Failed to find data nodes for cache: " + space);
  for (int p=0, parts=cctx.affinity().partitions(); p < parts; p++) {
    List<ClusterNode> owners=cctx.topology().owners(p);
    if (F.isEmpty(owners))     return null;
    dataNodes.retainAll(owners);
    if (dataNodes.isEmpty())     return null;
  }
  return dataNodes;
}

private Set < ClusterNode > replicatedUnstableDataNodes ( GridCacheContext < ? , ? > cctx ) { assert cctx . isReplicated ( ) : cctx . name ( ) + " must be replicated" ; String space = cctx . name ( ) ; Set < ClusterNode > dataNodes = new HashSet < > ( dataNodes ( space , NONE ) ) ; if ( dataNodes . isEmpty ( ) ) throw new CacheException ( "Failed to find data nodes for cache: " + space ) ; for ( int p = 0 , parts = cctx . affinity ( ) . partitions ( ) ; p < parts ; p ++ ) { List < ClusterNode > owners = cctx . topology ( ) . owners ( p ) ; if ( F . isEmpty ( owners ) ) return null ; dataNodes . retainAll ( owners ) ; if ( dataNodes . isEmpty ( ) ) return null ; } return dataNodes ; }
collects all the nodes owning all the partitions for the given replicated cache .
