Share via


AbstractPreferences.Sync Method

Definition

Implements the sync method as per the specification in Preferences#sync().

[Android.Runtime.Register("sync", "()V", "GetSyncHandler")]
public override void Sync ();
[<Android.Runtime.Register("sync", "()V", "GetSyncHandler")>]
override this.Sync : unit -> unit
Attributes

Exceptions

Remarks

Implements the sync method as per the specification in Preferences#sync().

This implementation calls a recursive helper method that locks this node, invokes syncSpi() on it, unlocks this node, and recursively invokes this method on each "cached child." A cached child is a child of this node that has been created in this VM and not subsequently removed. In effect, this method does a depth first traversal of the "cached subtree" rooted at this node, calling syncSpi() on each node in the subTree while only that node is locked. Note that syncSpi() is invoked top-down.

Java documentation for java.util.prefs.AbstractPreferences.sync().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to