Partager via


GenericDocument.TtlMillis Property

Definition

Returns the TTL (time-to-live) of the GenericDocument, in milliseconds.

public virtual long TtlMillis { [Android.Runtime.Register("getTtlMillis", "()J", "GetGetTtlMillisHandler", ApiSince=31)] get; }
[<get: Android.Runtime.Register("getTtlMillis", "()J", "GetGetTtlMillisHandler", ApiSince=31)>]
member this.TtlMillis : int64

Property Value

Attributes

Remarks

Returns the TTL (time-to-live) of the GenericDocument, in milliseconds.

The TTL is measured against #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.

Java documentation for android.app.appsearch.GenericDocument.getTtlMillis().

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