GenericDocument.Builder.SetTtlMillis(Int64) 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.
Sets the TTL (time-to-live) of the GenericDocument, in milliseconds.
[Android.Runtime.Register("setTtlMillis", "(J)Landroid/app/appsearch/GenericDocument$Builder;", "GetSetTtlMillis_JHandler", ApiSince=31)]
public virtual Java.Lang.Object SetTtlMillis(long ttlMillis);
[<Android.Runtime.Register("setTtlMillis", "(J)Landroid/app/appsearch/GenericDocument$Builder;", "GetSetTtlMillis_JHandler", ApiSince=31)>]
abstract member SetTtlMillis : int64 -> Java.Lang.Object
override this.SetTtlMillis : int64 -> Java.Lang.Object
Parameters
- ttlMillis
- Int64
a non-negative duration in milliseconds.
Returns
- Attributes
Remarks
Sets the TTL (time-to-live) of the GenericDocument, in milliseconds. The TTL is measured against GenericDocument.getCreationTimestampMillis(). At the timestamp of creationTimestampMillis + ttlMillis, measured in the System.currentTimeMillis time base, the document will be auto-deleted. The default value is 0, which means the document is permanent and won't be auto-deleted until the app is uninstalled or AppSearchSession.remove is called.
Android reference for android.app.appsearch.GenericDocument.Builder.setTtlMillis.
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.