class StreamingJobGraphGenerator {

	public JobGraph createJobGraph() {
		jobGraph = new JobGraph(streamGraph.getJobName());

		// make sure that all vertices start immediately
		jobGraph.setScheduleMode(ScheduleMode.ALL);

		init();

		// Generate deterministic hashes for the nodes in order to identify them across
		// submission iff they didn't change.
		Map<Integer, byte[]> hashes = traverseStreamGraphAndGenerateHashes();

		setChaining(hashes);

		setPhysicalEdges();

		setSlotSharing();
		
		configureCheckpointing();

		configureRestartStrategy();

		try {
			InstantiationUtil.writeObjectToConfig(this.streamGraph.getExecutionConfig(), this.jobGraph.getJobConfiguration(), ExecutionConfig.CONFIG_KEY);
		} catch (IOException e) {
			throw new RuntimeException("Config object could not be written to Job Configuration: ", e);
		}
		
		return jobGraph;
	}

	public  StreamingJobGraphGenerator(StreamGraph streamGraph);

}