Preferences.Flush Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Forces any changes in the contents of this preference node and its descendants to the persistent store.
[Android.Runtime.Register("flush", "()V", "GetFlushHandler")]
public abstract void Flush ();
[<Android.Runtime.Register("flush", "()V", "GetFlushHandler")>]
abstract member Flush : unit -> unit
- Attributes
Exceptions
if the backing store is unavailable or causes an operation failure.
Remarks
Forces any changes in the contents of this preference node and its descendants to the persistent store. Once this method returns successfully, it is safe to assume that all changes made in the subtree rooted at this node prior to the method invocation have become permanent.
Implementations are free to flush changes into the persistent store at any time. They do not need to wait for this method to be called.
When a flush occurs on a newly created node, it is made persistent, as are any ancestors (and descendants) that have yet to be made persistent. Note however that any preference value changes in ancestors are not guaranteed to be made persistent.
If this method is invoked on a node that has been removed with the #removeNode()
method, flushSpi() is invoked on this node, but not on others.
Java documentation for java.util.prefs.Preferences.flush()
.
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.