@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 |
protected class |
LookupTableService.DataAdapterListener |
static class |
LookupTableService.Function |
| Constructor and Description |
|---|
LookupTableService(LookupTableConfigService configService,
Map<String,LookupCache.Factory> cacheFactories,
Map<String,LookupDataAdapter.Factory> adapterFactories,
Map<String,LookupDataAdapter.Factory2> adapterFactories2,
ScheduledExecutorService scheduler,
com.google.common.eventbus.EventBus eventBus) |
@Inject public LookupTableService(LookupTableConfigService configService, Map<String,LookupCache.Factory> cacheFactories, Map<String,LookupDataAdapter.Factory> adapterFactories, Map<String,LookupDataAdapter.Factory2> adapterFactories2, @Named(value="daemonScheduler") ScheduledExecutorService scheduler, com.google.common.eventbus.EventBus eventBus)
protected LookupTableConfigService getConfigService()
protected ScheduledExecutorService getScheduler()
protected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractIdleServiceExceptionprotected void shutDown()
throws Exception
shutDown in class com.google.common.util.concurrent.AbstractIdleServiceExceptionpublic void handleAdapterUpdate(DataAdaptersUpdated updated)
public void handleAdapterDelete(DataAdaptersDeleted deleted)
public void handleCacheUpdate(CachesUpdated updated)
public void handleAdapterSharedStoreUpdate(AdapterSharedStoresUpdated updated)
public void handleCacheDelete(CachesDeleted deleted)
public void handleLookupTableUpdate(LookupTablesUpdated updated)
public void handleLookupTableDelete(LookupTablesDeleted deleted)
protected CountDownLatch createAndStartAdapters()
protected LookupDataAdapter createAdapter(DataAdapterDto dto)
protected void addListeners(LookupDataAdapter adapter, DataAdapterDto dto)
public Optional<CachePurge> newCachePurge(String tableName)
public LookupTableService.Builder newBuilder()
@Nullable public LookupTable getTable(String name)
public boolean hasTable(String name)
public Collection<LookupDataAdapter> getDataAdapters(Set<String> adapterNames)
public Collection<LookupCache> getCaches(Set<String> cacheNames)
Copyright © 2012–2022 Graylog, Inc.. All rights reserved.