com.kedwards.swt.persist
Interface Persistifier

All Known Implementing Classes:
FSPersistifier

public interface Persistifier

Persistifier.java

This is an interface for classes that know how to persistify and restore data from a Jini service wrapper.

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

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

Author:
Keith Edwards

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 loc)
          Change the "location" of storage.
 

Method Detail

restorable

public 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.

checkpoint

public void checkpoint(TaggedPersistentData data)
                throws java.io.IOException
Write the persistent data to stable storage.

restore

public TaggedPersistentData restore()
                             throws java.io.IOException
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.

getStorageLocation

public java.lang.String getStorageLocation()
Get the "location" of storage.

setStorageLocation

public void setStorageLocation(java.lang.String loc)
                        throws java.io.IOException
Change the "location" of storage.

delete

public void delete()
            throws java.io.IOException
Irrevocably remote persistent storage.