public abstract class LookupDataAdapter
extends com.google.common.util.concurrent.AbstractIdleService
Modifier and Type | Class and Description |
---|---|
static class |
LookupDataAdapter.Descriptor<C extends LookupDataAdapterConfiguration> |
static interface |
LookupDataAdapter.Factory<T extends LookupDataAdapter> |
Modifier | Constructor and Description |
---|---|
protected |
LookupDataAdapter(String id,
String name,
LookupDataAdapterConfiguration config,
com.codahale.metrics.MetricRegistry metricRegistry) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearError() |
protected abstract LookupResult |
doGet(Object key) |
protected abstract void |
doRefresh(LookupCachePurge cachePurge) |
protected abstract void |
doStart() |
protected abstract void |
doStop() |
LookupResult |
get(Object key) |
LookupDataAdapterConfiguration |
getConfig() |
Optional<Throwable> |
getError() |
String |
id() |
String |
name() |
void |
refresh(LookupCachePurge cachePurge) |
abstract org.joda.time.Duration |
refreshInterval()
Returns the refresh interval for this data adapter.
|
abstract void |
set(Object key,
Object value) |
protected void |
setError(Throwable throwable) |
protected void |
shutDown() |
protected void |
startUp() |
protected LookupDataAdapter(String id, String name, LookupDataAdapterConfiguration config, com.codahale.metrics.MetricRegistry metricRegistry)
protected void startUp() throws Exception
startUp
in class com.google.common.util.concurrent.AbstractIdleService
Exception
protected void shutDown() throws Exception
shutDown
in class com.google.common.util.concurrent.AbstractIdleService
Exception
public abstract org.joda.time.Duration refreshInterval()
Duration.ZERO
if refresh should be disabled.public void refresh(LookupCachePurge cachePurge)
protected abstract void doRefresh(LookupCachePurge cachePurge) throws Exception
Exception
protected void clearError()
protected void setError(Throwable throwable)
public String id()
public String name()
public LookupResult get(Object key)
protected abstract LookupResult doGet(Object key)
public LookupDataAdapterConfiguration getConfig()
Copyright © 2012–2018 Graylog, Inc.. All rights reserved.