@Test public void getCompletedWorkBadFilter() { List<QueuedWork> works0 = _workQueueMgr.getCompletedWork(new NetworkId("bogus"), new SnapshotId("bogus")); assertThat(works0, iterableWithSize(0)); }
public synchronized List<QueuedWork> getCompletedWork( NetworkId networkId, SnapshotId snapshotId) { ImmutableList.Builder<QueuedWork> b = ImmutableList.builder(); for (QueuedWork work : _queueCompletedWork) { if (work.getDetails().getNetworkId().equals(networkId) && work.getDetails().getSnapshotId().equals(snapshotId)) { b.add(work); } } return b.build(); }
WorkQueueMgr { public synchronized List<QueuedWork> getCompletedWork( NetworkId networkId, SnapshotId snapshotId) { ImmutableList.Builder<QueuedWork> b = ImmutableList.builder(); for (QueuedWork work : _queueCompletedWork) { if (work.getDetails().getNetworkId().equals(networkId) && work.getDetails().getSnapshotId().equals(snapshotId)) { b.add(work); } } return b.build(); } }
WorkQueueMgr { public synchronized List<QueuedWork> getCompletedWork( NetworkId networkId, SnapshotId snapshotId) { ImmutableList.Builder<QueuedWork> b = ImmutableList.builder(); for (QueuedWork work : _queueCompletedWork) { if (work.getDetails().getNetworkId().equals(networkId) && work.getDetails().getSnapshotId().equals(snapshotId)) { b.add(work); } } return b.build(); } WorkQueueMgr(BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager);   WorkQueueMgr(Type wqType, BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager); }
WorkQueueMgr { public synchronized List<QueuedWork> getCompletedWork( NetworkId networkId, SnapshotId snapshotId) { ImmutableList.Builder<QueuedWork> b = ImmutableList.builder(); for (QueuedWork work : _queueCompletedWork) { if (work.getDetails().getNetworkId().equals(networkId) && work.getDetails().getSnapshotId().equals(snapshotId)) { b.add(work); } } return b.build(); } WorkQueueMgr(BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager);   WorkQueueMgr(Type wqType, BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager); synchronized List<QueuedWork> getCompletedWork(
      NetworkId networkId, SnapshotId snapshotId); synchronized long getLength(QueueType qType); synchronized JSONObject getStatusJson(); synchronized QueuedWork getMatchingWork(WorkItem workItem, QueueType qType); synchronized QueuedWork getWork(UUID workId); @Nullable synchronized QueuedWork getWorkForAssignment(); @Nonnull synchronized List<QueuedWork> getWorkForChecking(); synchronized List<QueuedWork> listIncompleteWork(
      NetworkId networkId, @Nullable SnapshotId snapshotId, @Nullable WorkType workType); synchronized void makeWorkUnassigned(QueuedWork work); synchronized void markAssignmentError(QueuedWork work); synchronized void markAssignmentFailure(QueuedWork work); synchronized void markAssignmentSuccess(QueuedWork work, String assignedWorker); synchronized void processTaskCheckResult(QueuedWork work, Task task); synchronized boolean queueUnassignedWork(QueuedWork work); }
WorkQueueMgr { public synchronized List<QueuedWork> getCompletedWork( NetworkId networkId, SnapshotId snapshotId) { ImmutableList.Builder<QueuedWork> b = ImmutableList.builder(); for (QueuedWork work : _queueCompletedWork) { if (work.getDetails().getNetworkId().equals(networkId) && work.getDetails().getSnapshotId().equals(snapshotId)) { b.add(work); } } return b.build(); } WorkQueueMgr(BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager);   WorkQueueMgr(Type wqType, BatfishLogger logger, SnapshotMetadataMgr snapshotMetadataManager); synchronized List<QueuedWork> getCompletedWork(
      NetworkId networkId, SnapshotId snapshotId); synchronized long getLength(QueueType qType); synchronized JSONObject getStatusJson(); synchronized QueuedWork getMatchingWork(WorkItem workItem, QueueType qType); synchronized QueuedWork getWork(UUID workId); @Nullable synchronized QueuedWork getWorkForAssignment(); @Nonnull synchronized List<QueuedWork> getWorkForChecking(); synchronized List<QueuedWork> listIncompleteWork(
      NetworkId networkId, @Nullable SnapshotId snapshotId, @Nullable WorkType workType); synchronized void makeWorkUnassigned(QueuedWork work); synchronized void markAssignmentError(QueuedWork work); synchronized void markAssignmentFailure(QueuedWork work); synchronized void markAssignmentSuccess(QueuedWork work, String assignedWorker); synchronized void processTaskCheckResult(QueuedWork work, Task task); synchronized boolean queueUnassignedWork(QueuedWork work);  }