code: public void transferAllStateDataToDirectory(
  		IncrementalRemoteKeyedStateHandle restoreStateHandle,
  		Path dest,
  		CloseableRegistry closeableRegistry) throws Exception {
  
  		final Map<StateHandleID, StreamStateHandle> sstFiles =
  			restoreStateHandle.getSharedState();
  		final Map<StateHandleID, StreamStateHandle> miscFiles =
  			restoreStateHandle.getPrivateState();
  
  		downloadDataForAllStateHandles(sstFiles, dest, closeableRegistry);
  		downloadDataForAllStateHandles(miscFiles, dest, closeableRegistry);
  	}
docs: Transfer all state data to the target directory using specified number of threads.
  
  @param restoreStateHandle Handles used to retrieve the state data.
  @param dest The target directory which the state data will be stored.
  
  @throws Exception Thrown if can not transfer all the state data.