@Test public void assertSetSlaveId() { TaskContext actual = new TaskContext("test_job", Collections.singletonList(0), ExecutionType.READY, "slave-S0"); assertThat(actual.getSlaveId(), is("slave-S0")); actual.setSlaveId("slave-S1"); assertThat(actual.getSlaveId(), is("slave-S1")); }
public void setSlaveId(final String slaveId) { id = id.replaceAll(this.slaveId, slaveId); this.slaveId = slaveId; }
TaskContext { public void setSlaveId(final String slaveId) { id = id.replaceAll(this.slaveId, slaveId); this.slaveId = slaveId; } }
TaskContext { public void setSlaveId(final String slaveId) { id = id.replaceAll(this.slaveId, slaveId); this.slaveId = slaveId; } TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type);  TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type, final String slaveId); private  TaskContext(final String id, final MetaInfo metaInfo, final ExecutionType type, final String slaveId); }
TaskContext { public void setSlaveId(final String slaveId) { id = id.replaceAll(this.slaveId, slaveId); this.slaveId = slaveId; } TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type);  TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type, final String slaveId); private  TaskContext(final String id, final MetaInfo metaInfo, final ExecutionType type, final String slaveId); static TaskContext from(final String id); static String getIdForUnassignedSlave(final String id); void setSlaveId(final String slaveId); String getTaskName(); String getExecutorId(final String appName); }
TaskContext { public void setSlaveId(final String slaveId) { id = id.replaceAll(this.slaveId, slaveId); this.slaveId = slaveId; } TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type);  TaskContext(final String jobName, final List<Integer> shardingItem, final ExecutionType type, final String slaveId); private  TaskContext(final String id, final MetaInfo metaInfo, final ExecutionType type, final String slaveId); static TaskContext from(final String id); static String getIdForUnassignedSlave(final String id); void setSlaveId(final String slaveId); String getTaskName(); String getExecutorId(final String appName);  }