Hi all,

In our work we have noticed a fairly common data access pattern when
dealing with iterators (in Java, Iterator<T>) and iterator factories
(Iterable<T>), with respect to a given structure (T). This pattern is
illustrated in the attached image. Essentially it separates the
physical source of the data (such as a database, or memory) when it is
accessed iteratively.

The Iterator must also be closable, so that it can clean up
references, close database connections etc. Jena has a similar
interface ClosableIterator.

As far as we can tell, this has not been explicitly published
somewhere. Is anyone aware of a similar design pattern for data access
using iterators?

Cheers
Jevon

<<attachment: access-pattern.png>>

_______________________________________________
patterns-discussion mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/patterns-discussion

Reply via email to