1 |
Implementation of the synchronization mechanism:
-
objects that wish to collaborate implement Updatable interface:
-
getStateUpdate(int feature, DataOutputStream update)
-
updateState( int feature, DataInputStream update)
-
feature is a particular feature which is updated
-
when state of an object changes and synchronization is needed, object notifies the synchronization mechanism about the type of change by posting event to the Synchronizer:
-
new UpdateEvent( Updatable this, int feature)
-
special feature values UPDATE_CREATE, UPDATE_DELETE are recognized
-
the rest is taken care by the Synchronizer
|