Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.01.000alpha
-
Fix Version/s: None
-
Component/s: Code
-
Labels:None
-
Number of attachments :
Description
The current SnapshotManager is a class (extends Object) and this takes a bit of flexibility out of the system. Having a SnapshotManager interface, plus a JavaSerializationSnapshotManager would be ideal for users extending Prevayler to use their own SnapshotManagers.
Here's a proposed set of mods to the snapshot code. It makes SnaphotManager into an interface and adds the following classes...
AbstractBaseSnaphotManager - provides 99% of the implementation for any given SnapshotManager implementation. All the following classes extend this class (or another class that extends this class).
JavaSnaphotManager - What SnapshotManager used to be. Simply uses standard Java Serialization for snaphots
SkaringaSnapshotManager - What XmlSnaphotManager used to be
XStreamSnaphotManager - Adds XStream XML snapshot management. This is an alternative to Skaringa XML snapshot management.
NullSnapshotManager now extends JavaSnapshotManager, but is otherwise unchanged. As mentioned previously, XmlSnapshotManager is to be removed and replaced by SkaringaSnapshotManager.
It would be great if someone could review these. They all seem to work just fine for me. I hope to commit them soon.
Jake