Looks to me like we need a set of contract tests for Dataset. It would make extension/implementaiton validation simple.
Claude On Mon, Nov 16, 2015 at 5:12 PM, Andy Seaborne <[email protected]> wrote: > On 16/11/15 14:36, Chris Dollin wrote: > >> Dear All >> > > Hi Chris, > > >> Some time recently org.apache.jena.sparql.core.DatasetChanges >> > > git log > jena-arq/src/main/java/org/apache/jena/sparql/core/DatasetChanges.java > > grew a listen() method with the comment "Release any resources". >> > > s/listen\(\)/reset\(\)/ > > >> What sort of any are the released resources? Presumably finish() >> does resource cleanup, so what is reset doing that finish doesn't >> do? My best guess is that it is for abandoning state that is >> handling an incomplete series of triples without abandoning >> the entire state of the DatasetChanges implementation. >> > > I can't find any use of reset(). > > But a sequence of changes might be several start-finish to group things > but part of a larger process that is across the same internal resources in > which case a final "reset()" indicates that's all over e.g. a commit. it > decouples the app needs for grouping (e.g. a small set of related changes) > to a larger grouping like a transaction. > > start-finish-start-finish...-start-finish-reset > > Advance notice: > > It looks like DatasetChanges or an interface extending DatasetChanges or a > better-parallel interface needs to reflect transaction boundaries properly. > > This has now come up a couple of times in different places so it is > indicative that DatasetChanges isn't the right design. > > [I'm asking because ppd-index implements TextDocProducerBatch >> > > not part of Jena > > which implements DatasetChanges and I want to know what the >> expectation of callers of TextDocProducerBatch.reset)() may have.] >> > > Any experience to report especially regarding transactions and > DatasetChanges changes or replacement? > > >> Chris >> >> > Andy > > > -- I like: Like Like - The likeliest place on the web <http://like-like.xenei.com> LinkedIn: http://www.linkedin.com/in/claudewarren
