@Singleton
public final class GeoIpDbFileChangeMonitorService
extends com.google.common.util.concurrent.AbstractIdleService
If the database files have changed, a GeoIpDbFileChangedEvent is posted, to which GeoIpProcessor subscribes and reloads the GeoIpResolverEngine.
This service also subscribes to ClusterConfigChangedEvent to update the database files to be monitored, as well as to update the scheduled task (refreshDatabases()) which checks for file changes.
| Constructor and Description |
|---|
GeoIpDbFileChangeMonitorService(ScheduledExecutorService scheduler,
com.google.common.eventbus.EventBus eventBus,
ClusterConfigService clusterConfigService,
GeoIpVendorResolverService geoIpVendorResolverService) |
| Modifier and Type | Method and Description |
|---|---|
void |
onClusterConfigChanged(ClusterConfigChangedEvent event) |
protected void |
shutDown() |
protected void |
startUp() |
@Inject
public GeoIpDbFileChangeMonitorService(@Named(value="daemonScheduler")
ScheduledExecutorService scheduler,
com.google.common.eventbus.EventBus eventBus,
ClusterConfigService clusterConfigService,
GeoIpVendorResolverService geoIpVendorResolverService)
public void onClusterConfigChanged(ClusterConfigChangedEvent event)
protected void startUp()
throws Exception
startUp in class com.google.common.util.concurrent.AbstractIdleServiceExceptionCopyright © 2012–2022 Graylog, Inc.. All rights reserved.