@Contract(threading=SAFE)
public interface HttpCacheStorage
Implementations of this interface are expected to be threading-safe.
Modifier and Type | Method and Description |
---|---|
Map<String,HttpCacheEntry> |
getEntries(Collection<String> keys)
Retrieves multiple cache entries stored under the given keys.
|
HttpCacheEntry |
getEntry(String key)
Retrieves the cache entry stored under the given key
or null if no entry exists under that key.
|
void |
putEntry(String key,
HttpCacheEntry entry)
Store a given cache entry under the given key.
|
void |
removeEntry(String key)
Deletes/invalidates/removes any cache entries currently
stored under the given key.
|
void |
updateEntry(String key,
HttpCacheCASOperation casOperation)
Atomically applies the given callback to processChallenge an existing cache
entry under a given key.
|
void putEntry(String key, HttpCacheEntry entry) throws ResourceIOException
key
- where in the cache to store the entryentry
- cached response to storeResourceIOException
HttpCacheEntry getEntry(String key) throws ResourceIOException
key
- cache keyHttpCacheEntry
or null
if no
entry existsResourceIOException
void removeEntry(String key) throws ResourceIOException
key
- ResourceIOException
void updateEntry(String key, HttpCacheCASOperation casOperation) throws ResourceIOException, HttpCacheUpdateException
key
- indicates which entry to modifycasOperation
- the CAS operation to perform.ResourceIOException
HttpCacheUpdateException
Map<String,HttpCacheEntry> getEntries(Collection<String> keys) throws ResourceIOException
keys
- cache keysHttpCacheEntry
s.ResourceIOException
Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.