简体   繁体   English

解析本地数据存储区:管理脏的固定对象

[英]Parse Local Datastore: manage dirty pinned objects

How can one track whose Parse Local Datastore pinned objects were changed so that only those objects are synched with the server? 如何跟踪更改其“解析本地数据存储”固定对象的对象,以便仅将那些对象与服务器同步? Is it safe/enough to label pinned objects as dirty and only synch those to the server? 将固定的对象标记为脏对象并仅将其同步到服务器是否安全/足够? Or does saveEventually handles this automatically, ie, it only synchs dirty objects to the server and therefore the labelling of those pinned objects is redundant? 还是saveEventually自动处理此问题,即,它仅将脏对象同步到服务器,因此这些固定对象的标签是多余的吗?

Thanks! 谢谢!

Jorge, The simple answer is saveEventually will handle saving the changed object to the local datastore and will also save to the Parse server as well when a connection becomes available. 豪尔赫,简单的答案是saveEvent最终将处理将更改的对象保存到本地数据存储中,并且当连接可用时也将保存到解析服务器中。

Here is what the Parse Android guide has to say: The advantage is that if the user currently doesn't have a network connection, saveEventually will store the update on the device until a network connection is re-established. 这是Parse Android指南所说的:优点是,如果用户当前没有网络连接,则saveEventually会将更新存储在设备上,直到重新建立网络连接为止。 If your app is closed before the connection is back, Parse will try again the next time the app is opened. 如果在连接恢复之前关闭了您的应用程序,则Parse将在下次打开该应用程序时重试。

Parse Android Guide: https://parse.com/docs/android/guide#localdatastore 解析Android指南: https //parse.com/docs/android/guide#localdatastore
(Scroll down to the section labeled Saving Objects Offline) (向下滚动到标记为“离线保存对象”的部分)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM