code: public File getFile(String name) {
  		if (name == null) {
  			throw new NullPointerException("name must not be null");
  		}
  
  		Future<Path> future = cacheCopyTasks.get(name);
  		if (future == null) {
  			throw new IllegalArgumentException("File with name '" + name + "' is not available." +
  					" Did you forget to register the file?");
  		}
  
  		try {
  			final Path path = future.get();
  			URI tmp = path.makeQualified(path.getFileSystem()).toUri();
  			return new File(tmp);
  		}
  		catch (ExecutionException e) {
  			throw new RuntimeException("An error occurred while copying the file.", e.getCause());
  		}
  		catch (Exception e) {
  			throw new RuntimeException("Error while getting the file registered under '" + name +
  					"' from the distributed cache", e);
  		}
  	}
docs: ------------------------------------------------------------------------