Search in sources :

Example 1 with RecordState

use of com.nytimes.android.external.store3.base.RecordState in project Store by NYTimes.

the class StoreUtil method persisterIsStale.

static <Raw, Key> boolean persisterIsStale(@Nonnull Key key, Persister<Raw, Key> persister) {
    if (persister instanceof RecordProvider) {
        RecordProvider<Key> provider = (RecordProvider<Key>) persister;
        RecordState recordState = provider.getRecordState(key);
        return recordState == STALE;
    }
    return false;
}
Also used : RecordProvider(com.nytimes.android.external.store3.base.RecordProvider) RecordState(com.nytimes.android.external.store3.base.RecordState)

Aggregations

RecordProvider (com.nytimes.android.external.store3.base.RecordProvider)1 RecordState (com.nytimes.android.external.store3.base.RecordState)1