Filter:C# VB.NET C++ (.NET) Java PHP C++ Delphi / Pascal (VCL) C++Builder (VCL)
Receives provided objects from the client
[Delphi / Pascal (VCL)]
property OnPutObjects : TRTPutObjectsEvent;
TRTPutObjectsEvent = procedure( Sender : TObject; Info : array of TObjectInfo out Result : integer ) of object;
public __property RethyncServer::TRTPutObjectsEvent OnPutObjects;
typedef void (__closure *TRTPutObjectsEvent)( System::TObject* Sender, DynamicArray<TObjectInfo>* Info int &Result );
- Sender - Contains the reference to the object that fired an event
- Info - The list of objects filled with data to be stored locally
- 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 store data of each object in the server-side data storage.
The object for which the data is put is identified by ObjectID property of objects contained in Info array. Data is contained in ObjectData property of the corresponding Object.
If the object with given ID does not exist, the server must create a new object and put the data there. If the object with given ID exists, the server must update object's data with the data provided by the client.
Status property of the object must be set to "no error" if the data were set for the local object, or to corresponding status code if the object could not be accessed or created.
Object class must be locked by the client before any information that belongs to the class is synchronized, otherwise the server must return CLASS_NOT_LOCKED error.
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.