public RealApolloStore(@NotNull NormalizedCache normalizedCache, @NotNull CacheKeyResolver cacheKeyResolver, @NotNull final ScalarTypeAdapters scalarTypeAdapters, @NotNull Executor dispatcher, @NotNull ApolloLogger logger) { checkNotNull(normalizedCache, "cacheStore == null"); this.optimisticCache = (OptimisticNormalizedCache) new OptimisticNormalizedCache().chain(normalizedCache); this.cacheKeyResolver = checkNotNull(cacheKeyResolver, "cacheKeyResolver == null"); this.scalarTypeAdapters = checkNotNull(scalarTypeAdapters, "scalarTypeAdapters == null"); this.dispatcher = checkNotNull(dispatcher, "dispatcher == null"); this.logger = checkNotNull(logger, "logger == null"); this.lock = new ReentrantReadWriteLock(); this.subscribers = Collections.newSetFromMap(new WeakHashMap<RecordChangeSubscriber, Boolean>()); this.cacheKeyBuilder = new RealCacheKeyBuilder(); }
public RealAppSyncStore(@Nonnull NormalizedCache normalizedCache, @Nonnull CacheKeyResolver cacheKeyResolver, @Nonnull final ScalarTypeAdapters scalarTypeAdapters, @Nonnull Executor dispatcher, @Nonnull ApolloLogger logger) { checkNotNull(normalizedCache, "cacheStore == null"); this.optimisticCache = (OptimisticNormalizedCache) new OptimisticNormalizedCache().chain(normalizedCache); this.cacheKeyResolver = checkNotNull(cacheKeyResolver, "cacheKeyResolver == null"); this.scalarTypeAdapters = checkNotNull(scalarTypeAdapters, "scalarTypeAdapters == null"); this.dispatcher = checkNotNull(dispatcher, "dispatcher == null"); this.logger = checkNotNull(logger, "logger == null"); this.lock = new ReentrantReadWriteLock(); this.subscribers = Collections.newSetFromMap(new WeakHashMap<RecordChangeSubscriber, Boolean>()); }
public RealAppSyncStore(@Nonnull NormalizedCache normalizedCache, @Nonnull CacheKeyResolver cacheKeyResolver, @Nonnull final ScalarTypeAdapters scalarTypeAdapters, @Nonnull Executor dispatcher, @Nonnull ApolloLogger logger) { checkNotNull(normalizedCache, "cacheStore == null"); this.optimisticCache = (OptimisticNormalizedCache) new OptimisticNormalizedCache().chain(normalizedCache); this.cacheKeyResolver = checkNotNull(cacheKeyResolver, "cacheKeyResolver == null"); this.scalarTypeAdapters = checkNotNull(scalarTypeAdapters, "scalarTypeAdapters == null"); this.dispatcher = checkNotNull(dispatcher, "dispatcher == null"); this.logger = checkNotNull(logger, "logger == null"); this.lock = new ReentrantReadWriteLock(); this.subscribers = Collections.newSetFromMap(new WeakHashMap<RecordChangeSubscriber, Boolean>()); }