Skip to Content.
Sympa Menu

patterns-discussion - [patterns-discussion] Data Access pattern

patterns-discussion AT lists.cs.illinois.edu

Subject: General talk about software patterns

List archive

[patterns-discussion] Data Access pattern


Chronological Thread 
  • From: Jevon Wright <j.m.wright AT massey.ac.nz>
  • To: patterns-discussion AT cs.uiuc.edu
  • Subject: [patterns-discussion] Data Access pattern
  • Date: Tue, 23 Nov 2010 15:53:32 +1300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/patterns-discussion>
  • List-id: General talk about software patterns <patterns-discussion.cs.uiuc.edu>

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
Description: PNG image




Archive powered by MHonArc 2.6.16.

Top of Page