@Singleton
public class LookupTableService
extends com.google.common.util.concurrent.AbstractIdleService
It initially loads all entities and starts them, and later reacts on event bus messages to reflect the current system state.
Modifier and Type | Class and Description |
---|---|
static class |
LookupTableService.Builder |
static class |
LookupTableService.Function |
Constructor and Description |
---|
LookupTableService(DBDataAdapterService dbAdapters,
DBCacheService dbCaches,
DBLookupTableService dbTables,
Map<String,LookupCache.Factory> cacheFactories,
Map<String,LookupDataAdapter.Factory> adapterFactories,
ScheduledExecutorService scheduler,
com.google.common.eventbus.EventBus eventBus) |
Modifier and Type | Method and Description |
---|---|
Collection<LookupCache> |
getCaches(Set<String> cacheNames) |
Collection<LookupDataAdapter> |
getDataAdapters(Set<String> adapterNames) |
void |
handleAdapterDelete(DataAdaptersDeleted deleted) |
void |
handleAdapterUpdate(DataAdaptersUpdated updated) |
void |
handleCacheDelete(CachesDeleted deleted) |
void |
handleCacheUpdate(CachesUpdated updated) |
void |
handleLookupTableDelete(LookupTablesDeleted deleted) |
void |
handleLookupTableUpdate(LookupTablesUpdated updated) |
boolean |
hasTable(String name) |
LookupTableService.Builder |
newBuilder() |
Optional<CachePurge> |
newCachePurge(String tableName) |
protected void |
shutDown() |
protected void |
startUp() |
@Inject public LookupTableService(DBDataAdapterService dbAdapters, DBCacheService dbCaches, DBLookupTableService dbTables, Map<String,LookupCache.Factory> cacheFactories, Map<String,LookupDataAdapter.Factory> adapterFactories, @Named(value="daemonScheduler") ScheduledExecutorService scheduler, com.google.common.eventbus.EventBus eventBus)
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 void handleAdapterUpdate(DataAdaptersUpdated updated)
public void handleAdapterDelete(DataAdaptersDeleted deleted)
public void handleCacheUpdate(CachesUpdated updated)
public void handleCacheDelete(CachesDeleted deleted)
public void handleLookupTableUpdate(LookupTablesUpdated updated)
public void handleLookupTableDelete(LookupTablesDeleted deleted)
public Optional<CachePurge> newCachePurge(String tableName)
public LookupTableService.Builder newBuilder()
public boolean hasTable(String name)
public Collection<LookupDataAdapter> getDataAdapters(Set<String> adapterNames)
public Collection<LookupCache> getCaches(Set<String> cacheNames)
Copyright © 2012–2018 Graylog, Inc.. All rights reserved.