com.kedwards.swt.persist
Class FSPersistifier

java.lang.Object
  |
  +--com.kedwards.swt.persist.FSPersistifier
All Implemented Interfaces:
Persistifier
Direct Known Subclasses:
ActivationPersistifier

public class FSPersistifier
extends java.lang.Object
implements Persistifier

FSPersistifier.java

This is the default persistifier used by the SWT for non-activatable services. It simply writes checkpoint data to a file.

See http://www.kedwards.com/jini

No warranty expressed or implied; use at your own risk; for educational purposes only.

Author:
Keith Edwards

Constructor Summary
FSPersistifier(java.lang.String loc)
           
 
Method Summary
 void checkpoint(TaggedPersistentData data)
          Write the persistent data to stable storage.
 void delete()
          Irrevocably remote persistent storage.
 java.lang.String getStorageLocation()
          Get the "location" of storage.
 boolean restorable()
          Is the persistifier able to restore any prior state? This method may return false if, for instance, the service has never before been checkpointed.
 TaggedPersistentData restore()
          Read persistent data from stable storage and return it.
 void setStorageLocation(java.lang.String newLoc)
          Change the "location" of storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FSPersistifier

public FSPersistifier(java.lang.String loc)
               throws java.io.IOException
Method Detail

restorable

public boolean restorable()
Description copied from interface: Persistifier
Is the persistifier able to restore any prior state? This method may return false if, for instance, the service has never before been checkpointed.
Specified by:
restorable in interface Persistifier

checkpoint

public void checkpoint(TaggedPersistentData data)
                throws java.io.IOException
Description copied from interface: Persistifier
Write the persistent data to stable storage.
Specified by:
checkpoint in interface Persistifier

restore

public TaggedPersistentData restore()
                             throws java.io.IOException
Description copied from interface: Persistifier
Read persistent data from stable storage and return it. Particular implementations of this interface may restore implementation-specific data here and do special things with it.
Specified by:
restore in interface Persistifier

getStorageLocation

public java.lang.String getStorageLocation()
Description copied from interface: Persistifier
Get the "location" of storage.
Specified by:
getStorageLocation in interface Persistifier

setStorageLocation

public void setStorageLocation(java.lang.String newLoc)
                        throws java.io.IOException
Description copied from interface: Persistifier
Change the "location" of storage.
Specified by:
setStorageLocation in interface Persistifier

delete

public void delete()
            throws java.io.IOException
Description copied from interface: Persistifier
Irrevocably remote persistent storage.
Specified by:
delete in interface Persistifier