|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - the class representing the State that will be persistedpublic interface Persistent<E extends State>
This interface represents a persistent object.
The object is persisted using its State representation, by using the #getClass() method.
This interface also provides a synchronize() method, to synchronize the State instance with the current
state of the object to persist.
| Method Summary | |
|---|---|
E |
getState()
Gets the state of the persistent object. |
void |
synchronize()
Synchronizes the State instance with the current object state. |
| Method Detail |
|---|
E getState()
Implementing class should consider systematically calling the synchronize() method before returning the
actual state. It is not up to clients to synchronize the object themselves.
void synchronize()
It is not up to clients to synchronize the object themselves. Instead, this method should be called by the
getState() method.
On the other hand, this method is provided to allow aggregation classes to synchronize their aggregated instances
without requiring the call to the getState() method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||