org.ehcache.transactions.xa.journal
Class PersistentJournal<K>

java.lang.Object
  extended by org.ehcache.transactions.xa.journal.TransientJournal<K>
      extended by org.ehcache.transactions.xa.journal.PersistentJournal<K>
All Implemented Interfaces:
Journal<K>

public class PersistentJournal<K>
extends TransientJournal<K>

A persistent, but not durable Journal implementation. This implementation will persist saved states during close and restore them during open. If close is not called, all saved states are lost.


Nested Class Summary
protected static class PersistentJournal.SerializableEntry<K>
           
 
Nested classes/interfaces inherited from class org.ehcache.transactions.xa.journal.TransientJournal
TransientJournal.Entry<K>
 
Field Summary
 
Fields inherited from class org.ehcache.transactions.xa.journal.TransientJournal
states
 
Constructor Summary
PersistentJournal(java.io.File directory, Serializer<K> keySerializer)
           
 
Method Summary
 void close()
          Close the journal.
 void open()
          Open the journal.
 
Methods inherited from class org.ehcache.transactions.xa.journal.TransientJournal
forget, getInDoubtKeys, heuristicDecisions, isHeuristicallyTerminated, isInDoubt, recover, saveCommitted, saveInDoubt, saveRolledBack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentJournal

public PersistentJournal(java.io.File directory,
                         Serializer<K> keySerializer)
Method Detail

open

public void open()
          throws java.io.IOException
Description copied from interface: Journal
Open the journal.

Specified by:
open in interface Journal<K>
Overrides:
open in class TransientJournal<K>
Throws:
java.io.IOException - if there was an error opening the journal.

close

public void close()
           throws java.io.IOException
Description copied from interface: Journal
Close the journal.

Specified by:
close in interface Journal<K>
Overrides:
close in class TransientJournal<K>
Throws:
java.io.IOException - if there was an error closing the journal.