Class WorkerConfigUtil

java.lang.Object
com.illumon.iris.db.tables.remotequery.process.WorkerConfigUtil

public class WorkerConfigUtil extends Object
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 Details

    • WorkerConfigUtil

      public WorkerConfigUtil()
  • Method Details

    • getDetailedGcLoggingArgs

      public static List<String> getDetailedGcLoggingArgs()
      Gets GC logging JVM params
      Returns:
      list of JVM args for GC logging.
    • checkJvmArgBlacklist

      public static void checkJvmArgBlacklist(String... extraJvmArgs)
      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

      public static List<String> getUserExtraJvmArgs(RemoteProcessingRequest request)
    • asJvmPropertyArg

      public static 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. -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 defined
      value - property value
      Returns:
      String formatted for use as a JVM arg.
      Throws:
      NullPointerException - if value is null
    • createPersistentQueryHandle

      @NotNull public static Object createPersistentQueryHandle(@NotNull String className, @NotNull com.fishlib.io.logger.Logger log, @NotNull Object queryHandleContext) throws UncheckedDeephavenException
      Convenience method to instantiate a persistent query handle. Used by WorkerKind implementations.
      Parameters:
      className - Name of class to instantiate
      log - Logger object used as first constructor arg
      queryHandleContext - Object used as second constructor arg
      Returns:
      The instantiated PersistentQueryHandle
      Throws:
      UncheckedDeephavenException - if the handle could not be created.