comparison Changelog @ 32:c2d53bd30ab8

Re-factored artifact API for better integration of background processing. artifacts/trunk@78 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 13 Sep 2009 14:50:53 +0000
parents c4d85a8532d1
children 251e8904d6c2
comparison
equal deleted inserted replaced
31:c4d85a8532d1 32:c2d53bd30ab8
1 2009-09-13 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2
3 Refactored the persistent handling of the artifacts in the
4 artifact database. When an artifact is called (describe, feed,
5 advance, out) a new CallContext is given instead of the
6 old Object context. CallContext.globalContext() returns the
7 old Object context now. CallContext.afterCall() may be
8 called from inside describe, feed, advance and out to tell
9 the artifact database what to do after the processing of
10 the specific call.
11
12 The accepted values are:
13 - NOTHING for doing nothing
14 - TOUCH for just update the last access time
15 - STORE for persisting the artifact.
16 - BACKGROUND to signal that the artifact has started
17 a background operation.
18
19 After the background operation the artifact has to call
20 CallContext.fromBackground() to signal the artifact
21 database that the artifact needs to be touched or stored.
22
23 !!! Without this call the artifact database assumes there
24 !!! is still some background operation on this artifact
25 !!! which prevents reclaiming resources
26
27 * artifacts/src/main/java/de/intevation/artifacts/CallContext.java:
28 New. New API to cope with background processing.
29
30 * artifacts/src/main/java/de/intevation/artifacts/Artifact.java:
31 Replaced old Object context with CallContext context.
32
33 * artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java:
34 Adjusted.
35
36 * artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabase.java:
37 For a better encapsulation of the persistence operations of the
38 artifacts the database does not return artifacts any more. It delegates
39 the describe, feed, advance and out call to internal structures.
40
41 * artifacts/src/main/java/de/intevation/artifacts/ArtifactDatabaseException.java:
42 New. Simplifies handling of error conditions inside of artifact database.
43
44 * artifact-database/src/main/java/de/intevation/artifactdatabase/ArtifactDatabaseImpl.java:
45 Adjusted to new interface. Internally it handles the background API.
46
47 * artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java,
48 artifact-database/src/main/java/de/intevation/artifactdatabase/rest/FactoriesResource.java,
49 artifact-database/src/main/java/de/intevation/artifactdatabase/rest/OutRepresentation.java,
50 artifact-database/src/main/java/de/intevation/artifactdatabase/rest/CreateResource.java,
51 artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactOutResource.java:
52 Adjusted to new artifact database interface (which greatly simplifies things)
53
54 * artifact-database/src/main/java/de/intevation/artifactdatabase/DatabaseCleaner.java:
55 Artifacts in background are not removed from database any longer.
56
57 * artifact-database/src/main/java/de/intevation/artifactdatabase/App.java: Little
58 re-wirering need for new cleanup.
59
60 * artifact-database/src/main/java/de/intevation/artifactdatabase/Backend.java:
61 Simplified to do the SQL stuff only. The most infrastructure stuff is now done
62 in ArtifactDatabaseImpl.
63
64 * artifact-database/src/main/java/de/intevation/artifactdatabase/Id.java:
65 New. Helper base class to enable filtering of background artifacts by there
66 database id.
67
68 * artifact-database/src/main/resources/sql/org-h2-driver.properties:
69 Modified the INSERT statement to write the serialized artifact, too.
70
1 2009-09-12 Sascha L. Teichmann <sascha.teichmann@intevation.de> 71 2009-09-12 Sascha L. Teichmann <sascha.teichmann@intevation.de>
2 72
3 * artifacts/src/main/java/de/intevation/artifacts/Artifact.java(out): 73 * artifacts/src/main/java/de/intevation/artifacts/Artifact.java(out):
4 out() is now called with an java.io.Outputstream to place 74 out() is now called with an java.io.Outputstream to place
5 the output. 75 the output.

http://dive4elements.wald.intevation.org