Class WorkerConfigUtil
java.lang.Object
com.illumon.iris.db.tables.remotequery.process.WorkerConfigUtil
Utility methods that may have previously been in the WorkerControl subproject where they were not
accessible from the WorkerKind implementations in the DB subproject.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
asJvmPropertyArg
(String property, String value) Takes two strings, a property name and property value, respectively, and formats them as a string suitable for use as a JVM argument, e.g.static void
checkJvmArgBlacklist
(String... extraJvmArgs) Check whether any illegal JVM arguments have been specified.static Object
createPersistentQueryHandle
(String className, com.fishlib.io.logger.Logger log, Object queryHandleContext) Convenience method to instantiate a persistent query handle.Gets GC logging JVM params
-
Constructor Details
-
WorkerConfigUtil
public WorkerConfigUtil()
-
-
Method Details
-
getDetailedGcLoggingArgs
Gets GC logging JVM params- Returns:
- list of JVM args for GC logging.
-
checkJvmArgBlacklist
Check whether any illegal JVM arguments have been specified. This defaults to 'security properties may not be altered at runtime' but can be configured with the 'jvm.blacklist' property.- Parameters:
extraJvmArgs
- The list of requested additional JVM arguments being checked for invalid values.- Throws:
IllegalArgumentException
- if a blacklisted property is found.
-
getUserExtraJvmArgs
-
asJvmPropertyArg
Takes two strings, a property name and property value, respectively, and formats them as a string suitable for use as a JVM argument, e.g.-Dproperty=value
. The property must be non-null. If the value is null a blank value will be used.- Parameters:
property
- property name to be definedvalue
- property value- Returns:
- String formatted for use as a JVM arg.
- Throws:
NullPointerException
- ifvalue
isnull
-
createPersistentQueryHandle
public static Object createPersistentQueryHandle(String className, com.fishlib.io.logger.Logger log, Object queryHandleContext) Convenience method to instantiate a persistent query handle. Used by WorkerKind implementations.- Parameters:
className
- Name of class to instantiatelog
- Logger object used as first constructor argqueryHandleContext
- Object used as second constructor arg- Returns:
- The instantiated PersistentQueryHandle
-