V - public class ConsulCache<K,V> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ConsulCache.CallbackConsumer<V>
passed in by creators to vary the content of the cached values
|
static interface |
ConsulCache.Listener<K,V>
Implementers can register a listener to receive
a new map when it changes
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addListener(ConsulCache.Listener<K,V> listener) |
boolean |
awaitInitialized(long timeout,
TimeUnit unit) |
com.google.common.collect.ImmutableMap<K,V> |
getMap() |
protected com.orbitz.consul.cache.ConsulCache.State |
getState() |
boolean |
removeListener(ConsulCache.Listener<K,V> listener) |
void |
start() |
void |
stop() |
protected static QueryOptions |
watchParams(BigInteger index,
int blockSeconds) |
public boolean awaitInitialized(long timeout,
TimeUnit unit)
throws InterruptedException
InterruptedExceptionprotected static QueryOptions watchParams(BigInteger index, int blockSeconds)
public boolean addListener(ConsulCache.Listener<K,V> listener)
public boolean removeListener(ConsulCache.Listener<K,V> listener)
protected com.orbitz.consul.cache.ConsulCache.State getState()
Copyright © 2016. All rights reserved.