@Override public Void apply(JobExecutionStateListener input) { input.onMetadataChange(state, key, oldValue, newValue); return null; }
public void setMedatata(String key, Object value) { this.changeLock.lock(); try { Object oldValue = this.executionMetadata.get(key); this.executionMetadata.put(key, value); if (this.listener.isPresent()) { this.listener.get().onMetadataChange(this, key, oldValue, value); } } finally { this.changeLock.unlock(); } }
Mockito.verify(l1).onStageTransition(Mockito.eq(state), Mockito.eq(JobExecutionState.UKNOWN_STAGE), Mockito.eq("Stage1")); Mockito.verify(l1).onMetadataChange(Mockito.eq(state), Mockito.eq("key"), Mockito.eq("oldValue"), Mockito.eq("newValue")); Mockito.verify(l2).onStageTransition(Mockito.eq(state), Mockito.verify(l3).onStageTransition(Mockito.eq(state), Mockito.eq(JobExecutionState.UKNOWN_STAGE), Mockito.eq("Stage1")); Mockito.verify(l3).onMetadataChange(Mockito.eq(state), Mockito.eq("key"), Mockito.eq("oldValue"), Mockito.eq("newValue"));
@Override public Void apply(JobExecutionStateListener input) { input.onMetadataChange(state, key, oldValue, newValue); return null; }
public void setMedatata(String key, Object value) { this.changeLock.lock(); try { Object oldValue = this.executionMetadata.get(key); this.executionMetadata.put(key, value); if (this.listener.isPresent()) { this.listener.get().onMetadataChange(this, key, oldValue, value); } } finally { this.changeLock.unlock(); } }