void setInProgressMutationAsCompleted(String recordIdentifier) { persistentOfflineMutationManager.removePersistentMutationObject(recordIdentifier); inMemoryOfflineMutationManager.removeFromQueue(recordIdentifier); queueHandler.setMutationInProgressStatusToFalse(); queueHandler.clearInMemoryOfflineMutationObjectBeingExecuted(); queueHandler.clearPersistentOfflineMutationObjectBeingExecuted(); }
void clearMutationQueue(){ inMemoryOfflineMutationManager.clearMutationQueue(); persistentOfflineMutationManager.clearMutationQueue(); } }
private void notifyErrorToAllListeners(ApolloException e) { for (AppSyncSubscriptionCall.Callback listener : listeners) { listener.onFailure(e); } } }
@Override public void run() { delegate.onNetworkError(e); } });
private void notifyDisconnectionEventToAllListeners() { for (AppSyncSubscriptionCall.Callback listener : listeners) { //Let all listeners know the connection was disconnected. listener.onCompleted(); } }
@Override public void run() { delegate.onSuccess(); } });
@Override public void run() { delegate.onFailure(e); } });
@Override public void run() { delegate.onHttpError(e); } });
boolean mutationQueueEmpty() { return ( persistentOfflineMutationManager.isQueueEmpty() && inMemoryOfflineMutationManager.isQueueEmpty()); }
/** * Clear the mutation queue. A Mutation that is currently in progress will continue to execute until finished. * */ public void clearMutationQueue() { mAppSyncOfflineMutationManager.clearMutationQueue(); } }
/** * Used to check if the mutation queue is empty. * @return true if queue is empty, false otherwise. */ public boolean isMutationQueueEmpty() { if (mAppSyncOfflineMutationManager != null ) { return mAppSyncOfflineMutationManager.mutationQueueEmpty(); } return true; }
/** * * @return */ public static Builder builder() { return new Builder(); }
@Override public void cancel() { if (!canceled) { AWSAppSyncDeltaSync.cancel(id); canceled = true; } }
void updateQueueHandler(AppSyncOfflineMutationInterceptor.QueueUpdateHandler queueHandler) { this.queueHandler = queueHandler; networkInvoker.updateQueueHandler(queueHandler); }
void updateQueueHandler(AppSyncOfflineMutationInterceptor.QueueUpdateHandler queueHandler) { this.queueHandler = queueHandler; this.persistentOfflineMutationManager.updateQueueHandler(queueHandler); }
public static AppSyncMutationsSqlHelper create(Context context) { return new AppSyncMutationsSqlHelper(context); }
public void fail(final String identifier) { mutationInterceptor.failConflictMutation(identifier); }
static AWSAppSyncClient createAppSyncClientWithIAM() { return createAppSyncClientWithIAM(true, 0); }
static AWSAppSyncClient createAppSyncClientWithAPIKEY() { return createAppSyncClientWithAPIKEY(true, 0); }
void setInProgressPersistentMutationAsCompleted(String recordIdentifier) { persistentOfflineMutationManager.removePersistentMutationObject(recordIdentifier); queueHandler.setMutationInProgressStatusToFalse(); queueHandler.clearInMemoryOfflineMutationObjectBeingExecuted(); queueHandler.clearPersistentOfflineMutationObjectBeingExecuted(); }