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.