Bug 256415 - [repo] Change the IArtifactRepository.getArtifactKeys() to return an Iterator
Summary: [repo] Change the IArtifactRepository.getArtifactKeys() to return an Iterator
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M5   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 256418
  Show dependency tree
 
Reported: 2008-11-25 06:15 EST by Thomas Hallgren CLA
Modified: 2009-12-14 09:21 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hallgren CLA 2008-11-25 06:15:24 EST
The IArtifactRepository.getArtifactKeys() returns an array of all available artifact keys of the repository. Given a huge artifact repository this can potentially be very resource demanding.

Proposal:
If the method is required, then change it to return an Iterator. Perhaps in combination with a method that returns the number of contained artifact keys.
Comment 1 Pascal Rapicault CLA 2008-11-25 08:44:35 EST
See also bug #256434.
Comment 2 Pascal Rapicault CLA 2008-12-03 11:35:27 EST
This sounds a good idea.
Comment 3 Pascal Rapicault CLA 2008-12-03 11:36:23 EST
Putting a query mechanism in place could also bring us much more.
Comment 4 Andrew Niefer CLA 2009-11-06 13:53:36 EST
This is difficult due to concurrency issues.

Perhaps we should just remove this method entirely in favor of the query (bug 256434).
Comment 5 Ian Bull CLA 2009-12-11 22:12:03 EST
Andrew, do you think we can remove this method now?
Comment 6 Andrew Niefer CLA 2009-12-14 09:21:22 EST
This method is gone in the branch, don't remember when exactly it got pulled.