diff src/org/dancres/blitz/txn/StoragePersonality.java @ 0:3dc0c5604566

Initial checkin of blitz 2.0 fcs - no installer yet.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 21 Mar 2009 11:00:06 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/dancres/blitz/txn/StoragePersonality.java	Sat Mar 21 11:00:06 2009 +0000
@@ -0,0 +1,31 @@
+package org.dancres.blitz.txn;
+
+import org.prevayler.implementation.SnapshotPrevayler;
+import org.prevayler.PrevalentSystem;
+
+/**
+   <p>The work of translating the <code>StorageModel</code> instance specified
+   in the configuration file to an appropriate runtime configuration
+   is done by instances of this interface obtained from
+   <code>StoragePersonalityFactory.getPersonality(StorageModel)</code>.</p>
+
+   <p>The rest of the Blitz core uses the personality to obtain instances
+   of certain key components within the system which collectively determine
+   Blitz's storage behaviour.</p>
+
+   @see org.dancres.blitz.config.StorageModel
+
+   @see org.dancres.blitz.txn.StoragePersonalityFactory
+*/
+public interface StoragePersonality {
+    public CheckpointTrigger getCheckpointTrigger(Checkpointer aCheckpointer);
+
+    public SnapshotPrevayler getPrevayler(PrevalentSystem aSystem)
+        throws Exception;
+
+    /**
+       Invoke this method to clear up underlying storage associated with
+       the personality.
+     */
+    public void destroy();
+}