diff options
author | spingel | 2008-04-10 22:16:49 +0000 |
---|---|---|
committer | spingel | 2008-04-10 22:16:49 +0000 |
commit | e2183c24a2f11754e8ab657abd8c17c6b1e907f3 (patch) | |
tree | bbb6c96355d861da30ff1e03c50f0bb46fcfb6bd /org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java | |
parent | fe1d72ae6e4ed769dc686e4cdf2ce80734ecebd4 (diff) | |
download | org.eclipse.mylyn.tasks-e2183c24a2f11754e8ab657abd8c17c6b1e907f3.tar.gz org.eclipse.mylyn.tasks-e2183c24a2f11754e8ab657abd8c17c6b1e907f3.tar.xz org.eclipse.mylyn.tasks-e2183c24a2f11754e8ab657abd8c17c6b1e907f3.zip |
NEW - bug 194258: [api] [performance] Stream multi task data retrieval straight to storage bypassing in memory cache
https://bugs.eclipse.org/bugs/show_bug.cgi?id=194258
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java')
-rw-r--r-- | org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java index ddb271733..9d3b5779a 100644 --- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java +++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java @@ -28,6 +28,7 @@ import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_RESO import org.eclipse.mylyn.monitor.core.StatusHandler; import org.eclipse.mylyn.tasks.core.AbstractAttributeFactory; import org.eclipse.mylyn.tasks.core.AbstractTask; +import org.eclipse.mylyn.tasks.core.AbstractTaskCollector; import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; import org.eclipse.mylyn.tasks.core.RepositoryOperation; import org.eclipse.mylyn.tasks.core.RepositoryStatus; @@ -109,10 +110,11 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler { } @Override - public Set<RepositoryTaskData> getMultiTaskData(TaskRepository repository, Set<String> taskIds, + public void getMultiTaskData(TaskRepository repository, Set<String> taskIds, AbstractTaskCollector collector, IProgressMonitor monitor) throws CoreException { try { - + monitor.beginTask("Receiving tasks", taskIds.size()); + Set<RepositoryTaskData> result = new HashSet<RepositoryTaskData>(); BugzillaClient client = connector.getClientManager().getClient(repository); try { @@ -141,12 +143,15 @@ public class BugzillaTaskDataHandler extends AbstractTaskDataHandler { configureTaskData(repository, repositoryTaskData); // } } + + collector.accept(repositoryTaskData); + monitor.worked(1); } - return result; - } catch (IOException e) { throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.PLUGIN_ID, RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e)); + } finally { + monitor.done(); } } |