public interface CacheStore
| Modifier and Type | Method and Description |
|---|---|
static CacheStore |
build()
Builds a no-op cache store.
|
Future<Void> |
delete(io.vertx.ext.web.client.impl.cache.CacheKey key)
Delete a key from the cache.
|
default void |
delete(io.vertx.ext.web.client.impl.cache.CacheKey key,
Handler<AsyncResult<Void>> handler)
Delete all variations of a key from the cache.
|
Future<Void> |
flush()
Delete all entries from the cache.
|
default void |
flush(Handler<AsyncResult<Void>> handler)
Delete all entries from the cache.
|
Future<io.vertx.ext.web.client.impl.cache.CachedHttpResponse> |
get(io.vertx.ext.web.client.impl.cache.CacheKey key)
Retrieve a cached response.
|
default void |
get(io.vertx.ext.web.client.impl.cache.CacheKey key,
Handler<AsyncResult<io.vertx.ext.web.client.impl.cache.CachedHttpResponse>> handler)
Retrieve a cached response.
|
static CacheStore |
localStore()
Builds a cache store that uses a
ConcurrentHashMap. |
Future<io.vertx.ext.web.client.impl.cache.CachedHttpResponse> |
set(io.vertx.ext.web.client.impl.cache.CacheKey key,
io.vertx.ext.web.client.impl.cache.CachedHttpResponse response)
Add a response in the cache with the given key.
|
default void |
set(io.vertx.ext.web.client.impl.cache.CacheKey key,
io.vertx.ext.web.client.impl.cache.CachedHttpResponse response,
Handler<AsyncResult<io.vertx.ext.web.client.impl.cache.CachedHttpResponse>> handler)
Add a response in the cache with the given key.
|
static CacheStore |
sharedDataStore(Vertx vertx)
Builds a cache store that uses an
AsyncMap from
SharedData. |
static CacheStore build()
static CacheStore sharedDataStore(Vertx vertx)
AsyncMap from
SharedData.vertx - the vertx instancestatic CacheStore localStore()
ConcurrentHashMap.Future<io.vertx.ext.web.client.impl.cache.CachedHttpResponse> get(io.vertx.ext.web.client.impl.cache.CacheKey key)
key - the key to retrieveFuture<io.vertx.ext.web.client.impl.cache.CachedHttpResponse> set(io.vertx.ext.web.client.impl.cache.CacheKey key, io.vertx.ext.web.client.impl.cache.CachedHttpResponse response)
key - the key to store the response atresponse - the response to storeFuture<Void> delete(io.vertx.ext.web.client.impl.cache.CacheKey key)
key - the key to deleteFuture<Void> flush()
default void get(io.vertx.ext.web.client.impl.cache.CacheKey key,
Handler<AsyncResult<io.vertx.ext.web.client.impl.cache.CachedHttpResponse>> handler)
key - the key to retrievehandler - a handler to receive the cached responseget(CacheKey)default void set(io.vertx.ext.web.client.impl.cache.CacheKey key,
io.vertx.ext.web.client.impl.cache.CachedHttpResponse response,
Handler<AsyncResult<io.vertx.ext.web.client.impl.cache.CachedHttpResponse>> handler)
key - the key to store the response atresponse - the response to storehandler - a handler to receive the stored responseset(CacheKey, CachedHttpResponse)default void delete(io.vertx.ext.web.client.impl.cache.CacheKey key,
Handler<AsyncResult<Void>> handler)
key - the key to deletehandler - a handler to receive the delete resultdelete(CacheKey)default void flush(Handler<AsyncResult<Void>> handler)
handler - a handler to receive the flush result.flush()Copyright © 2022 Eclipse. All rights reserved.