public final class OptimisticNormalizedCache extends NormalizedCache
| Constructor and Description |
|---|
OptimisticNormalizedCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAll()
Clears all records from the cache.
|
Record |
loadRecord(java.lang.String key,
CacheHeaders cacheHeaders) |
java.util.Set<java.lang.String> |
merge(Record record,
CacheHeaders cacheHeaders) |
java.util.Set<java.lang.String> |
mergeOptimisticUpdate(Record record) |
java.util.Set<java.lang.String> |
mergeOptimisticUpdates(java.util.Collection<Record> recordSet) |
boolean |
remove(CacheKey cacheKey)
Remove cached record by the key
|
java.util.Set<java.lang.String> |
removeOptimisticUpdates(java.util.UUID mutationId) |
chain, loadRecords, merge, nextCache@Nullable public Record loadRecord(@Nonnull java.lang.String key, @Nonnull CacheHeaders cacheHeaders)
loadRecord in class NormalizedCachekey - The key of the record to read.cacheHeaders - The cache headers associated with the request which generated this record.Record for key. If not present return null.@Nonnull
public java.util.Set<java.lang.String> merge(@Nonnull
Record record,
@Nonnull
CacheHeaders cacheHeaders)
merge in class NormalizedCacherecord - The Record to merge.cacheHeaders - The CacheHeaders associated with the request which generated this record.Record.mergeWith(Record).public void clearAll()
NormalizedCacheApolloClient.clearNormalizedCache() for a thread-safe access to this method.clearAll in class NormalizedCachepublic boolean remove(@Nonnull
CacheKey cacheKey)
NormalizedCacheremove in class NormalizedCachecacheKey - of record to be removedtrue if record with such key was successfully removed, false otherwise@Nonnull
public java.util.Set<java.lang.String> mergeOptimisticUpdates(@Nonnull
java.util.Collection<Record> recordSet)
@Nonnull
public java.util.Set<java.lang.String> mergeOptimisticUpdate(@Nonnull
Record record)
@Nonnull
public java.util.Set<java.lang.String> removeOptimisticUpdates(@Nonnull
java.util.UUID mutationId)