.setInstructions(makeJobUpdateInstructions().newBuilder()));
}
private IJobUpdateInstructions makeJobUpdateInstructions() {
return IJobUpdateInstructions.build(new JobUpdateInstructions()
.setDesiredState(new InstanceTaskConfig()
.setTask(makeTaskConfig())
.setInstances(ImmutableSet.of(new Range(0, 7), new Range(8, 9))))
.setInitialState(ImmutableSet.of(
new InstanceTaskConfig()
.setInstances(ImmutableSet.of(new Range(0, 1), new Range(2, 3)))
.setTask(makeTaskConfig()),
new InstanceTaskConfig()
.setInstances(ImmutableSet.of(new Range(4, 5), new Range(6, 7)))
.setTask(makeTaskConfig())))
.setSettings(new JobUpdateSettings()
.setBlockIfNoPulsesAfterMs(500)
.setUpdateOnlyTheseInstances(ImmutableSet.of(new Range(0, 0), new Range(3, 5)))));