Package com.illumon.iris.controller
Class PersistentQueryController
java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.controller.PersistentQueryController
- All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task
public class PersistentQueryController
extends com.fishlib.util.process.OnetimeShutdownTask
Stand-alone controller for Iris.
Hosts a configuration PHT, a state PDHT, monitors server status, and dispatches stop/start commands.
Thread-safety notes:
- All changes to IrisQueryInfos are protected by the lock on the associated PDHT's map.
- All PersistentQueryConfiguration instances that are published (in the associated PHT or PersistentQueryInfo) are guaranteed not to be further mutated. Hence, they can be read safely at all times.
- All changes to a PersistentQueryConfiguration (by serial, not by instance, since published instances are immutable) are protected by a serial-specific lock. Query starts/stops are also protected, since they must always use the most up-to-date version of the configuration.
Configuration properties
- PersistentQueryController.host - The hostname of this controller
- PersistentQueryController.port - The port for communication
- PersistentQueryController.useLocalGit (optional) - When set to true use the local filesystem as a repository
- PersistentQueryController.gitGcEnabled (optional) - When set to true a git gc will be periodically performed
- PersistentQueryController.statusCheckTimes - When an AnomalyClient is used, defines the times to check in with status
- PersistentQueryController.failureWindowMillis - How long failures are queued
- PersistentQueryController.failureNumQueriesThreshold - How many failures are required before notifying the AnomalyClient
- PersistentQueryController.failureResendMillis - The minimum gap between failure messages
- PersistentQueryController.commitCheckpointImmediate (optional) - Immediately checkpoint the PDHT state on startup
- RemoteProcessingRequestProfile.defaultProfile - The default JVM args profile to use
- RemoteProcessingRequestProfile.noneProfile - The JVM profile to use when "None" is selected
-
Method Details
-
getName
-
getHost
-
getPort
public static int getPort() -
shutdown
public void shutdown()- Specified by:
shutdown
in classcom.fishlib.util.process.OnetimeShutdownTask
-
main
public static void main(String... args) throws IOException, ClassNotFoundException, ConfigurationVerificationException
-