|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PersistentPeer
Any object which should persist over time should have a PersistentPeer which handles saving it. This allows a separate object to worry about persistence issues, specifically whether the object should save to a flatfile or database, and how that saving occurs.
| Method Summary | |
|---|---|
boolean |
isRestoring()
An implementation uses this to tell its Persistent that it is in the middle of restoring. |
void |
restore()
Gets data about this peer from storage and gives it back to the object for which this peer exists. |
void |
save()
Triggers a save of its peer. |
void |
setPersistent(Persistent ob)
Assigns a persistent object to this peer for persistence operations. |
| Method Detail |
|---|
void restore()
throws PersistenceException
PersistenceException - if an error occurs during restore
void save()
throws PersistenceException
PersistenceException - if a problem occurs in savingvoid setPersistent(Persistent ob)
ob - the implementation of com.planet_ink.coffee_mud.core.intermud.persist.Persistent that this is a peer forPersistentboolean isRestoring()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||