private Region<?,?> createRegionGlobally(String key){
  Region<?,?> r=null;
  r=cache.getRegion(key);
  if (r != null)   return r;
  do {
    Result result=cliCmds.createRegion(key,defaultRegionType,null,null,true,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
    r=cache.getRegion(key);
    if (result.getStatus() == Status.ERROR && r == null) {
      String err="";
      while (result.hasNextLine())       err+=result.nextLine();
      throw new RegionCreationException(err);
    }
  }
 while (r == null);
  return r;
}

private Region < ? , ? > createRegionGlobally ( String key ) { Region < ? , ? > r = null ; r = cache . getRegion ( key ) ; if ( r != null ) return r ; do { Result result = cliCmds . createRegion ( key , defaultRegionType , null , null , true , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null ) ; r = cache . getRegion ( key ) ; if ( result . getStatus ( ) == Status . ERROR && r == null ) { String err = "" ; while ( result . hasNextLine ( ) ) err += result . nextLine ( ) ; throw new RegionCreationException ( err ) ; } } while ( r == null ) ; return r ; }
this method creates a region globally with the given name . if there is an error in the creation , a runtime exception will be thrown .
