public void updateTask(TaskStateType.TaskState t, TaskStateType.TaskState.State state) { LOG.log(Level.INFO, "Update task with state ''{0}''", state); TaskStateType.TaskState update = TaskStateType.TaskState.newBuilder() .setOrigin(HANDLER) .setState(state) .setSerial(t.getSerial() + 1) .setWireSchema(t.getWireSchema()) .setPayload(t.getPayload()) .build(); send(update); }
public void updateTask(TaskStateType.TaskState t, TaskStateType.TaskState.State state, V result) { LOG.log( Level.INFO, "Update task with state ''{0}'' and payload ''{1}''", new Object[] {state, result}); ByteString payload = outSerial.serialize(result); ByteString schema = outSerial.getSchema(); TaskStateType.TaskState update = TaskStateType.TaskState.newBuilder() .setOrigin(HANDLER) .setState(state) .setSerial(t.getSerial() + 1) .setWireSchema(schema) .setPayload(payload) .build(); send(update); }