/** * <p>Adds provided {@link AppSyncPrefetch} that is currently in progress.</p> * * <p><b>Note</b>: This method needs to be called right before a prefetch call is executed.</p> */ void registerPrefetchCall(@Nonnull AppSyncPrefetch appSyncPrefetch) { checkNotNull(appSyncPrefetch, "appSyncPrefetch == null"); OperationName operationName = appSyncPrefetch.operation().name(); registerCall(activePrefetchCalls, operationName, appSyncPrefetch); }
/** * <p>Adds provided {@link AppSyncPrefetch} that is currently in progress.</p> * * <p><b>Note</b>: This method needs to be called right before a prefetch call is executed.</p> */ void registerPrefetchCall(@Nonnull AppSyncPrefetch appSyncPrefetch) { checkNotNull(appSyncPrefetch, "appSyncPrefetch == null"); OperationName operationName = appSyncPrefetch.operation().name(); registerCall(activePrefetchCalls, operationName, appSyncPrefetch); }
/** * <p>Removes provided {@link AppSyncPrefetch} that finished his execution, if it is found, else throws an * {@link AssertionError}.</p> * * If the removal operation is successful and no active running calls are found, then the registered * {@link ApolloCallTracker#idleResourceCallback} is invoked. * * <p><b>Note</b>: This method needs to be called right after a prefetch call is completed (whether successful or * failed).</p> */ void unregisterPrefetchCall(@Nonnull AppSyncPrefetch appSyncPrefetch) { checkNotNull(appSyncPrefetch, "appSyncPrefetch == null"); OperationName operationName = appSyncPrefetch.operation().name(); unregisterCall(activePrefetchCalls, operationName, appSyncPrefetch); }
/** * <p>Removes provided {@link AppSyncPrefetch} that finished his execution, if it is found, else throws an * {@link AssertionError}.</p> * * If the removal operation is successful and no active running calls are found, then the registered * {@link ApolloCallTracker#idleResourceCallback} is invoked. * * <p><b>Note</b>: This method needs to be called right after a prefetch call is completed (whether successful or * failed).</p> */ void unregisterPrefetchCall(@Nonnull AppSyncPrefetch appSyncPrefetch) { checkNotNull(appSyncPrefetch, "appSyncPrefetch == null"); OperationName operationName = appSyncPrefetch.operation().name(); unregisterCall(activePrefetchCalls, operationName, appSyncPrefetch); }