Create SimpleObservableList and use it for SPIMPipelineProgressViewController
Merge request reports
Activity
assigned to @koz01
- Resolved by Petr Bainar
- Resolved by Petr Bainar
- Resolved by Petr Bainar
- Resolved by Petr Bainar
10 11 class TaskObservableValueRegistry implements Closeable { 12 13 private final BenchmarkJob job; 14 private final SimpleObservableList<Task> observableTaskList; 15 private Timer timer; 16 private boolean isRunning = false; 17 18 public TaskObservableValueRegistry(final BenchmarkJob job) { 19 this.job = job; 20 this.observableTaskList = new SimpleObservableList<>(new ArrayList<Task>(), 21 this::evaluateTimer); 22 } 23 24 @Override 25 public void close() { Addressed. Synchronization is now in place.
As for reusing the existing code, although there are notable similarities between
HaasOutputObservableValueRegistry
andTaskObservableValueRegistry
, there are also some differences. For example, the first one works withSimpleObservableValue
and keeps an eye on the count of listeners manually, whereas the latter works withSimpleObservableList
and keeps track of the interested parties via a different mechanism (there are inherited methods for this purpose).Personally, I would like to have a look at a class called
ObservableBenchmarkJobRegistry
first. Specifically, I suspect that it could be converted into a class analogous toTaskObservableValueRegistry
. If this is the case, it would give us a clear hint how code duplication should be eliminated.If you are happy with my proposal, I can mark this comment as resolved.
- Resolved by Petr Bainar
- Resolved by Petr Bainar