jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Esteban Franqueiro" <esteban.franque...@bea.com>
Subject Re: Realtime datastore garbage collector
Date Tue, 13 Nov 2007 21:10:02 GMT

> Could you please describe it a bit more in detail? How do you avoid
> deleting a record that is not yet saved?

Yes, sure.
I have implemented the following, and it solves the scenario I originally mentioned.
The idea is to do something like this in SharedItemStateManager.Update.end()

List addedProps = buildListOfAddedProps(shared);

Where addedProps has the DataIdentifier's of the properties in the ChangeLog.addedStates()


And in DatabaseDataStore.removeTransientIdentifiers() the last modified time of each of those

properties is updated, and its entry in the inUse weak hash map is removed (I know it's weak,
but I 
prefer to delete it myself).

For this to be prettier, I think some changes should be done. For example, the way the persistence

manager gets a reference to the data store (I added a parameter so far). Another thing is
the DataIdentifier from a PropertyState/PropertyImpl is quite involved. There should be an
interface or something like that for this job.


Esteban Franqueiro

Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

View raw message