public class KVCache extends ConsulCache<String,Value>
ConsulCache.CallbackConsumer<V>, ConsulCache.Listener<K,V>| Modifier and Type | Method and Description |
|---|---|
static KVCache |
newCache(KeyValueClient kvClient,
String rootPath)
Factory method to construct a String/
Value map with a 10 second
block interval |
static KVCache |
newCache(KeyValueClient kvClient,
String rootPath,
int watchSeconds)
Factory method to construct a String/
Value map. |
static KVCache |
newCache(KeyValueClient kvClient,
String rootPath,
int watchSeconds,
QueryOptions queryOptions) |
addListener, awaitInitialized, close, getListeners, getMap, getMapWithMetadata, getState, removeListener, start, stop, watchParamspublic static KVCache newCache(KeyValueClient kvClient, String rootPath, int watchSeconds, QueryOptions queryOptions)
public static KVCache newCache(KeyValueClient kvClient, String rootPath, int watchSeconds)
Value map.kvClient - the KeyValueClient to userootPath - the root path (will be stripped from keys in the cache)watchSeconds - how long to tell the Consul server to wait for new values (note that
if this is 60 seconds or more, the client's read timeout will need
to be increased as well)public static KVCache newCache(KeyValueClient kvClient, String rootPath)
Value map with a 10 second
block intervalkvClient - the KeyValueClient to userootPath - the root pathCopyright © 2018. All rights reserved.