public abstract class AbstractSerializingAsyncCacheStorage<T,CAS> extends Object implements HttpAsyncCacheStorage
| Constructor and Description | 
|---|
| AbstractSerializingAsyncCacheStorage(int maxUpdateRetries,
                                    HttpCacheEntrySerializer<T> serializer) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract org.apache.hc.core5.concurrent.Cancellable | bulkRestore(Collection<String> storageKeys,
           org.apache.hc.core5.concurrent.FutureCallback<Map<String,T>> callback) | 
| protected abstract org.apache.hc.core5.concurrent.Cancellable | delete(String storageKey,
      org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback) | 
| protected abstract String | digestToStorageKey(String key) | 
| org.apache.hc.core5.concurrent.Cancellable | getEntries(Collection<String> keys,
          org.apache.hc.core5.concurrent.FutureCallback<Map<String,HttpCacheEntry>> callback)Retrieves multiple cache entries stored under the given keys. | 
| org.apache.hc.core5.concurrent.Cancellable | getEntry(String key,
        org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)Retrieves the cache entry stored under the given key
 or null if no entry exists under that key. | 
| protected abstract org.apache.hc.core5.concurrent.Cancellable | getForUpdateCAS(String storageKey,
               org.apache.hc.core5.concurrent.FutureCallback<CAS> callback) | 
| protected abstract T | getStorageObject(CAS cas) | 
| org.apache.hc.core5.concurrent.Cancellable | putEntry(String key,
        HttpCacheEntry entry,
        org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)Store a given cache entry under the given key. | 
| org.apache.hc.core5.concurrent.Cancellable | removeEntry(String key,
           org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)Deletes/invalidates/removes any cache entries currently
 stored under the given key. | 
| protected abstract org.apache.hc.core5.concurrent.Cancellable | restore(String storageKey,
       org.apache.hc.core5.concurrent.FutureCallback<T> callback) | 
| protected abstract org.apache.hc.core5.concurrent.Cancellable | store(String storageKey,
     T storageObject,
     org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback) | 
| protected abstract org.apache.hc.core5.concurrent.Cancellable | updateCAS(String storageKey,
         CAS cas,
         T storageObject,
         org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback) | 
| org.apache.hc.core5.concurrent.Cancellable | updateEntry(String key,
           HttpCacheCASOperation casOperation,
           org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)Atomically applies the given callback to processChallenge an existing cache
 entry under a given key. | 
public AbstractSerializingAsyncCacheStorage(int maxUpdateRetries,
                                    HttpCacheEntrySerializer<T> serializer)
protected abstract T getStorageObject(CAS cas) throws ResourceIOException
ResourceIOExceptionprotected abstract org.apache.hc.core5.concurrent.Cancellable store(String storageKey, T storageObject, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
protected abstract org.apache.hc.core5.concurrent.Cancellable restore(String storageKey, org.apache.hc.core5.concurrent.FutureCallback<T> callback)
protected abstract org.apache.hc.core5.concurrent.Cancellable getForUpdateCAS(String storageKey, org.apache.hc.core5.concurrent.FutureCallback<CAS> callback)
protected abstract org.apache.hc.core5.concurrent.Cancellable updateCAS(String storageKey, CAS cas, T storageObject, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
protected abstract org.apache.hc.core5.concurrent.Cancellable delete(String storageKey, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
protected abstract org.apache.hc.core5.concurrent.Cancellable bulkRestore(Collection<String> storageKeys, org.apache.hc.core5.concurrent.FutureCallback<Map<String,T>> callback)
public final org.apache.hc.core5.concurrent.Cancellable putEntry(String key, HttpCacheEntry entry, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
HttpAsyncCacheStorageputEntry in interface HttpAsyncCacheStoragekey - where in the cache to store the entryentry - cached response to storecallback - result callbackpublic final org.apache.hc.core5.concurrent.Cancellable getEntry(String key, org.apache.hc.core5.concurrent.FutureCallback<HttpCacheEntry> callback)
HttpAsyncCacheStoragegetEntry in interface HttpAsyncCacheStoragekey - cache keycallback - result callbackHttpCacheEntry or null if no
   entry existspublic final org.apache.hc.core5.concurrent.Cancellable removeEntry(String key, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
HttpAsyncCacheStorageremoveEntry in interface HttpAsyncCacheStoragecallback - result callbackpublic final org.apache.hc.core5.concurrent.Cancellable updateEntry(String key, HttpCacheCASOperation casOperation, org.apache.hc.core5.concurrent.FutureCallback<Boolean> callback)
HttpAsyncCacheStorageupdateEntry in interface HttpAsyncCacheStoragekey - indicates which entry to modifycasOperation - the CAS operation to perform.callback - result callbackpublic final org.apache.hc.core5.concurrent.Cancellable getEntries(Collection<String> keys, org.apache.hc.core5.concurrent.FutureCallback<Map<String,HttpCacheEntry>> callback)
HttpAsyncCacheStoragegetEntries in interface HttpAsyncCacheStoragekeys - cache keyscallback - result callbackCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.