Filter:C# VB.NET C++ (.NET) Java PHP C++ Delphi / Pascal (VCL) C++Builder (VCL)
Locks the object class for further work with objects
public __property RethyncServer::TRTLockClassEvent OnLockClass;
typedef void (__closure *TRTLockClassEvent)( System::TObject* Sender, AnsiString* CLSID, AnsiString* Parameters, int &Result );
- Sender - Contains the reference to the object that fired an event
- CLSID - The ID of the class to lock
- Parameters - Optional parameters that the client passes to the server to control what data is to be locked and processed
- Result - Event handler must set the parameter to 0 if no problems happened during handling of this event or to one of defined error codes in case of failure
The event handler should lock the object class before synchronizing its objects. Locking is necessary to prevent concurrent modification of data by multiple clients.
If the backend data storage does not support locking, it is strongly recommended to return 0 and remember "locked" status for the class anyway, because other event handlers that perform actual data transfer must check lock status and return CLASS_NOT_LOCKED if synchronization is requested without locking.
Read more about object classes.
If the implementation needs to add some information or status to the centralized log, it can use Log() method of Engine object provided in OnOpenSession event.
Got questions or comments about this topic? Tell us about them.