package Ġjp . co . sor am its u . feature _ staking _ impl . domain . recommend ations Ċ Ċ import Ġandroidx . lifecycle . Lifecycle Ċ import Ġjp . co . sor am its u . common . data . memory . Comp ut ational Cache Ċ import Ġjp . co . sor am its u . feature _ staking _ api . domain . model . Validator Ċ import Ġjp . co . sor am its u . feature _ staking _ impl . domain . validators . Validator Provider Ċ import Ġjp . co . sor am its u . feature _ staking _ impl . domain . validators . Validator Source Ċ import Ġkotlinx . coroutines . Dispatch ers Ċ import Ġkotlinx . coroutines . with Context Ċ Ċ private Ġconst Ġval ĠE LECT ED _ VALID ATORS _ CACHE Ġ= Ġ" E LECT ED _ VALID ATORS _ CACHE " Ċ Ċ class ĠValidator Recommend ator Factory ( ĊĠĠĠ Ġprivate Ġval Ġvalidator Provider : ĠValidator Provider , ĊĠĠĠ Ġprivate Ġval Ġcomputational Cache : ĠComput ational Cache Ċ ) Ġ{ ĊĊĠĠĠ Ġsuspend Ġfun Ġawait Validator Loading ( lifecycle : ĠLifecycle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġload Validators ( lifecycle ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġsuspend Ġfun Ġload Validators ( lifecycle : ĠLifecycle ) Ġ= Ġcomputational Cache . use Cache ( E LECT ED _ VALID ATORS _ CACHE , Ġlifecycle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġvalidator Provider . get Validators ( Validator Source . Elect ed ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġcreate ( lifecycle : ĠLifecycle ): ĠValidator Recommend ator Ġ= Ġwith Context ( Dispatch ers . IO ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġvalidators : ĠList < Validator > Ġ= Ġload Validators ( lifecycle ) ĊĊĠĠĠĠĠĠĠ ĠValidator Recommend ator ( validators ) ĊĠĠĠ Ġ} Ċ } Ċ