Package org.graylog.plugins.map.geoip
Class GeoIpDbFileChangeMonitorService
java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.graylog.plugins.map.geoip.GeoIpDbFileChangeMonitorService
- All Implemented Interfaces:
com.google.common.util.concurrent.Service
@Singleton
public final class GeoIpDbFileChangeMonitorService
extends com.google.common.util.concurrent.AbstractIdleService
A service to check whether the ASN and City MaxMind/IPInfo database files have changed, as well as whether the configuration has changed.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.common.util.concurrent.Service
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
-
Constructor Summary
ConstructorDescriptionGeoIpDbFileChangeMonitorService
(ScheduledExecutorService scheduler, com.google.common.eventbus.EventBus eventBus, ClusterConfigService clusterConfigService, GeoIpVendorResolverService geoIpVendorResolverService, S3GeoIpFileService s3GeoIpFileService, NotificationService notificationService) -
Method Summary
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, executor, failureCause, isRunning, serviceName, startAsync, state, stopAsync, toString
-
Constructor Details
-
GeoIpDbFileChangeMonitorService
@Inject public GeoIpDbFileChangeMonitorService(@Named("daemonScheduler") ScheduledExecutorService scheduler, com.google.common.eventbus.EventBus eventBus, ClusterConfigService clusterConfigService, GeoIpVendorResolverService geoIpVendorResolverService, S3GeoIpFileService s3GeoIpFileService, NotificationService notificationService)
-
-
Method Details