public class PollingJsonStoreReloadableConfigContainer<T> extends Object implements ReloadableConfigContainer<T>
JsonStore
.
This container caches a copy of the entity and keeps it up to date relative to the copy in the JSON store based on a
fixed polling interval. Polling is only done lazily on calls to getConfig()
.
Constructor and Description |
---|
PollingJsonStoreReloadableConfigContainer(JsonStore jsonStore,
String key,
String context,
Class<T> entityClass) |
PollingJsonStoreReloadableConfigContainer(JsonStore jsonStore,
String key,
String context,
Class<T> entityClass,
long pollingIntervalMs,
io.github.resilience4j.retry.Retry retry) |
Modifier and Type | Method and Description |
---|---|
T |
getConfig() |
void |
reload()
Instruct the container to reload the in-memory configuration from the backing configuration.
|
public PollingJsonStoreReloadableConfigContainer(JsonStore jsonStore, String key, String context, Class<T> entityClass, long pollingIntervalMs, io.github.resilience4j.retry.Retry retry)
public void reload()
ReloadableConfigContainer
reload
in interface ReloadableConfigContainer<T>
public T getConfig()
getConfig
in interface ReloadableConfigContainer<T>
Copyright © 2020. All rights reserved.