use of com.google.firebase.firestore.local.SQLitePersistence in project firebase-android-sdk by firebase.
the class SQLiteComponentProvider method createGarbageCollectionScheduler.
@Override
protected Scheduler createGarbageCollectionScheduler(Configuration configuration) {
LruDelegate lruDelegate = ((SQLitePersistence) getPersistence()).getReferenceDelegate();
LruGarbageCollector gc = lruDelegate.getGarbageCollector();
return gc.newScheduler(configuration.getAsyncQueue(), getLocalStore());
}
use of com.google.firebase.firestore.local.SQLitePersistence in project firebase-android-sdk by firebase.
the class SQLiteComponentProvider method createPersistence.
@Override
protected Persistence createPersistence(Configuration configuration) {
LocalSerializer serializer = new LocalSerializer(new RemoteSerializer(configuration.getDatabaseInfo().getDatabaseId()));
LruGarbageCollector.Params params = LruGarbageCollector.Params.WithCacheSizeBytes(configuration.getSettings().getCacheSizeBytes());
return new SQLitePersistence(configuration.getContext(), configuration.getDatabaseInfo().getPersistenceKey(), configuration.getDatabaseInfo().getDatabaseId(), serializer, params);
}
Aggregations