code: @Override
  	public FsCheckpointStateOutputStream createCheckpointStateOutputStream(CheckpointedStateScope scope) throws IOException {
  		Path target = scope == CheckpointedStateScope.EXCLUSIVE ? checkpointDirectory : sharedStateDirectory;
  		int bufferSize = Math.max(DEFAULT_WRITE_BUFFER_SIZE, fileStateThreshold);
  
  		return new FsCheckpointStateOutputStream(target, filesystem, bufferSize, fileStateThreshold);
  	}
docs: ------------------------------------------------------------------------