public class AWSAppSyncClient
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
AWSAppSyncClient.AWSAppSyncDeltaSyncWatcher |
static class |
AWSAppSyncClient.Builder |
Modifier and Type | Method and Description |
---|---|
static AWSAppSyncClient.Builder |
builder() |
void |
clearCaches()
Clears the different client databases on the local device
which stores the following:
1) Query Cache - query responses
2) Mutation Queue - offline persistent mutations
3) Delta Sync Metadata Cache - Subscriptions Metadata
If there are only on-going delta sync operations, they won't be impacted.
|
void |
clearCaches(ClearCacheOptions clearCacheOptions)
Clears the different client databases on the local device
based on the ClearCacheOptions object passed in.
|
void |
clearMutationQueue()
Deprecated.
Since 2.9.0. This method will be removed in the next minor version.
Please use #clearCaches(ClearCacheOptions.builder()
.clearMutations().build()) instead.
|
S3ObjectManager |
getS3ObjectManager() |
AppSyncStore |
getStore() |
boolean |
isMutationQueueEmpty()
Used to check if the mutation queue is empty.
|
<D extends Mutation.Data,T,V extends Mutation.Variables> |
mutate(<any> mutation) |
protected <D extends Mutation.Data,T,V extends Mutation.Variables> |
mutate(<any> mutation,
boolean isRetry) |
<D extends Mutation.Data,T,V extends Mutation.Variables> |
mutate(<any> mutation,
D withOptimisticUpdates) |
protected <D extends Mutation.Data,T,V extends Mutation.Variables> |
mutate(<any> mutation,
D withOptimisticUpdates,
boolean isRetry) |
<D extends Query.Data,T,V extends Query.Variables> |
query(<any> query) |
<D extends Subscription.Data,T,V extends Subscription.Variables> |
subscribe(<any> subscription) |
<D extends Query.Data,T,V extends Query.Variables> |
sync(<any> baseQuery,
<any> baseQueryCallback,
<any> deltaQuery,
<any> deltaQueryCallback,
long baseRefreshIntervalInSeconds)
Provides the ability to sync using a baseQuery, deltaQuery, and a refresh interval
|
<D extends Query.Data,T,V extends Query.Variables> |
sync(<any> baseQuery,
<any> baseQueryCallback,
<any> subscription,
AppSyncSubscriptionCall.Callback subscriptionCallback)
Provides the ability to sync using a baseQuery and Subscription
|
<D extends Query.Data,T,V extends Query.Variables> |
sync(<any> baseQuery,
<any> baseQueryCallback,
<any> subscription,
AppSyncSubscriptionCall.Callback subscriptionCallback,
<any> deltaQuery,
<any> deltaQueryCallback,
long baseRefreshIntervalInSeconds)
Provides the ability to sync using a baseQuery, deltaQuery, subscription, and a refresh interval
|
<D extends Query.Data,T,V extends Query.Variables> |
sync(<any> baseQuery,
<any> baseQueryCallback,
long baseRefreshIntervalInSeconds)
Provides the ability to sync using a baseQuery and a refresh interval
|
public static AWSAppSyncClient.Builder builder()
public <D extends Query.Data,T,V extends Query.Variables> <any> query(<any> query)
public <D extends Mutation.Data,T,V extends Mutation.Variables> <any> mutate(<any> mutation)
protected <D extends Mutation.Data,T,V extends Mutation.Variables> <any> mutate(<any> mutation, boolean isRetry)
protected <D extends Mutation.Data,T,V extends Mutation.Variables> <any> mutate(<any> mutation, D withOptimisticUpdates, boolean isRetry)
public <D extends Subscription.Data,T,V extends Subscription.Variables> <any> subscribe(<any> subscription)
public <D extends Mutation.Data,T,V extends Mutation.Variables> <any> mutate(<any> mutation, D withOptimisticUpdates)
public AppSyncStore getStore()
public S3ObjectManager getS3ObjectManager()
public <D extends Query.Data,T,V extends Query.Variables> Cancelable sync(<any> baseQuery, <any> baseQueryCallback, <any> subscription, AppSyncSubscriptionCall.Callback subscriptionCallback, <any> deltaQuery, <any> deltaQueryCallback, long baseRefreshIntervalInSeconds)
D
- T
- V
- baseQuery
- the base query to get the baseline statebaseQueryCallback
- callback to handle the baseQuery resultssubscription
- subscription to get changes on the flysubscriptionCallback
- callback to handle the subscription messagesdeltaQuery
- the catchup querydeltaQueryCallback
- callback to handle the deltaQuery resultsbaseRefreshIntervalInSeconds
- time duration (specified in seconds) when the base query will be re-run to get an updated baseline state.public <D extends Query.Data,T,V extends Query.Variables> Cancelable sync(<any> baseQuery, <any> baseQueryCallback, long baseRefreshIntervalInSeconds)
D
- T
- V
- baseQuery
- the base query to get the baseline statebaseQueryCallback
- callback to handle the baseQuery resultsbaseRefreshIntervalInSeconds
- time duration (specified in seconds) when the base query will be re-run to get an updated baseline state.public <D extends Query.Data,T,V extends Query.Variables> Cancelable sync(<any> baseQuery, <any> baseQueryCallback, <any> deltaQuery, <any> deltaQueryCallback, long baseRefreshIntervalInSeconds)
D
- T
- V
- baseQuery
- the base query to get the baseline statebaseQueryCallback
- callback to handle the baseQuery resultsdeltaQuery
- the catchup querydeltaQueryCallback
- callback to handle the deltaQuery resultsbaseRefreshIntervalInSeconds
- time duration (specified in seconds) when the base query will be re-run to get an updated baseline state.public <D extends Query.Data,T,V extends Query.Variables> Cancelable sync(<any> baseQuery, <any> baseQueryCallback, <any> subscription, AppSyncSubscriptionCall.Callback subscriptionCallback)
D
- T
- V
- baseQuery
- the base query to get the baseline statebaseQueryCallback
- callback to handle the baseQuery resultssubscription
- subscription to get changes on the flysubscriptionCallback
- callback to handle the subscription messagespublic boolean isMutationQueueEmpty()
@Deprecated public void clearMutationQueue()
public void clearCaches() throws ClearCacheException
ClearCacheException
public void clearCaches(ClearCacheOptions clearCacheOptions) throws ClearCacheException
ClearCacheException