Language

TrainingInterval.Builder.SetMinimumInterval(Duration) Method

Definition

Sets the minimum time interval between two training runs.

[Android.Runtime.Register("setMinimumInterval", "(Ljava/time/Duration;)Landroid/adservices/ondevicepersonalization/TrainingInterval$Builder;", "", ApiSince=35)]
public Android.AdServices.OnDevicePersonalization.TrainingInterval.Builder SetMinimumInterval(Java.Time.Duration value);
[<Android.Runtime.Register("setMinimumInterval", "(Ljava/time/Duration;)Landroid/adservices/ondevicepersonalization/TrainingInterval$Builder;", "", ApiSince=35)>]
member this.SetMinimumInterval : Java.Time.Duration -> Android.AdServices.OnDevicePersonalization.TrainingInterval.Builder

Parameters

value
Duration

The minimum time between task runs. It is used only for recurrent tasks, where it must be at least one millisecond.

Returns

This builder, with the minimum interval assigned.

Attributes

Remarks

Sets the minimum time interval between two training runs.

This field will only be used when the scheduling mode is TrainingInterval.SCHEDULING_MODE_RECURRENT. For a recurrent task, use an interval of at least one millisecond. The builder does not validate this value, but FederatedComputeScheduler.Schedule can throw an IllegalArgumentException if the interval is less than one millisecond.

Please also note this value is advisory, which does not guarantee the job will be run immediately after the interval expired. Federated compute will still enforce a minimum required interval and training constraints to ensure system health. The current training constraints are device on unmetered network, idle and battery not low.

Android reference for android.adservices.ondevicepersonalization.TrainingInterval.Builder.setMinimumInterval.

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