TrainingInterval.Builder

public static final class TrainingInterval.Builder
extends Object

java.lang.Object
   ↳ android.adservices.ondevicepersonalization.TrainingInterval.Builder


TrainingInterval のビルダー

まとめ

パブリック コンストラクタ

Builder()

パブリック メソッド

TrainingInterval build()

インスタンスを作成します。

TrainingInterval.Builder setMinimumInterval(Duration value)

2 つのトレーニング実行の最小時間間隔を設定します。

TrainingInterval.Builder setSchedulingMode(int value)

継承されるメソッド

パブリック コンストラクタ

パブリック メソッド

build

public TrainingInterval build ()

インスタンスを作成します。呼び出し後にこのビルダーに変更を加えないでください。

戻り値
TrainingInterval この値が null になることはありません。

setMinimumInterval

public TrainingInterval.Builder setMinimumInterval (Duration value)

2 つのトレーニング実行の最小時間間隔を設定します。

このフィールドは、スケジューリング モードが TrainingInterval.SCHEDULING_MODE_RECURRENT の場合にのみ使用されます。正の値のみを受け入れます。ゼロまたは負の値を指定すると IllegalAexpire が発生します。

また、この値はアドバイザリであり、間隔が終了した直後にジョブが実行されることを保証するものではありません。フェデレーション コンピューティングでは、システムの健全性を確保するために必要な最小間隔とトレーニングの制約が適用されます。現在のトレーニングの制約は、デバイスが定額制ネットワーク上にある、アイドル状態であり、バッテリー残量が少なくないというものです。

パラメータ
value Duration: この値を null にすることはできません。

戻り値
TrainingInterval.Builder この値が null になることはありません。

setSchedulingMode

public TrainingInterval.Builder setSchedulingMode (int value)

パラメータ
value int: 値は TrainingInterval.SCHEDULING_MODE_ONE_TIME または TrainingInterval.SCHEDULING_MODE_RECURRENT です。

戻り値
TrainingInterval.Builder この値が null になることはありません。