out.writeBoolean(allowQueuedScheduling);
// write the task vertices using java serialization (to resolve references in the object graph)
out.writeInt(taskVertices.size());
ObjectOutputStream oos = new ObjectOutputStream(new DataOutputViewStream(out));
for (AbstractJobVertex vertex : this.taskVertices.values()) {
oos.writeObject(vertex);
}
oos.close();