Class PersistentQueryConfiguration

java.lang.Object
com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
com.illumon.iris.controller.PersistentQueryConfiguration
All Implemented Interfaces:
com.fishlib.base.Copyable<DefaultPersistentQueryConfiguration>, com.fishlib.base.log.LogOutputAppendable, com.fishlib.base.SafeCloneable<DefaultPersistentQueryConfiguration>, com.fishlib.dataobjects.persistence.WObjectStreamConstants, com.fishlib.dataobjects.WAbstractDataObject, Externalizable, Serializable, Cloneable

public class PersistentQueryConfiguration extends DefaultPersistentQueryConfiguration
PersistentQueryConfiguration contains the persistent state for a query.
See Also:
  • Field Details

  • Constructor Details

    • PersistentQueryConfiguration

      public PersistentQueryConfiguration()
    • PersistentQueryConfiguration

      public PersistentQueryConfiguration(PersistentQueryConfiguration other)
  • Method Details

    • getRestartUsersFormatter

      public static com.fishlib.base.formatters.EnumFormatter getRestartUsersFormatter()
    • clone

      Specified by:
      clone in interface com.fishlib.dataobjects.WAbstractDataObject
      Overrides:
      clone in class DefaultPersistentQueryConfiguration
    • toDetailedString

      public String toDetailedString()
    • toString

      public String toString()
      Overrides:
      toString in class DefaultPersistentQueryConfiguration
    • getDescription

      public String getDescription()
    • appendDetailed

      public com.fishlib.base.log.LogOutput appendDetailed(com.fishlib.base.log.LogOutput logOutput)
    • append

      public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput)
      Specified by:
      append in interface com.fishlib.base.log.LogOutputAppendable
      Overrides:
      append in class DefaultPersistentQueryConfiguration
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class DefaultPersistentQueryConfiguration
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class DefaultPersistentQueryConfiguration
    • deepEquals

      public boolean deepEquals(@Nullable @Nullable PersistentQueryConfiguration other)
      Compare this configuration to another and check the equality of all fields, not just the serial like equals(Object).
      Parameters:
      other - the object to compare with
      Returns:
      true if this object is equal to the other
    • getScriptPathSet

      public static Set<String> getScriptPathSet(String owner, UserContext userContext, IrisGroupProvider irisGroupProvider, PersistentQueryScriptSource persistentQueryScriptSource, long serial)
    • validate

      Throws:
      PersistentQueryConfiguration.ValidationFailure
    • getHeapSizeInMB

      public int getHeapSizeInMB()
    • getHeapSizeInGB

      public double getHeapSizeInGB()
      Overrides:
      getHeapSizeInGB in class DefaultPersistentQueryConfiguration
    • getAdditionalMemoryInGB

      public double getAdditionalMemoryInGB()
      Overrides:
      getAdditionalMemoryInGB in class DefaultPersistentQueryConfiguration
    • getJvmArguments

      public String[] getJvmArguments(ControllerConfigurationType controllerConfigurationType)
    • getExtraJvmArgumentsAsString

      public String getExtraJvmArgumentsAsString()
    • setExtraJvmArgumentsFromString

      public void setExtraJvmArgumentsFromString(String text)
    • getClassPathAdditionsAsString

      public String getClassPathAdditionsAsString()
    • setClassPathAdditionsFromString

      public void setClassPathAdditionsFromString(String text)
    • getExtraJvmArgumentsAsList

      @NotNull public @NotNull List<String> getExtraJvmArgumentsAsList()
    • setExtraJvmArgumentsFromList

      public void setExtraJvmArgumentsFromList(@NotNull @NotNull List<String> extraJvmArgumentsList)
    • getExtraEnvironmentVariablesAsString

      public String getExtraEnvironmentVariablesAsString()
    • setExtraEnvironmentVariablesFromString

      public void setExtraEnvironmentVariablesFromString(String text)
    • setKubernetesControl

      public void setKubernetesControl(KubernetesCreationInfo kci)
    • getExtraEnvironmentVariablesAsMap

      @NotNull public @NotNull Map<String,String> getExtraEnvironmentVariablesAsMap()
    • setExtraEnvironmentVariablesFromMap

      public void setExtraEnvironmentVariablesFromMap(@NotNull @NotNull Map<String,String> extraEnvironmentVariablesMap)
    • getReplicaCount

      public int getReplicaCount()
      Overrides:
      getReplicaCount in class DefaultPersistentQueryConfiguration
    • getSpareCount

      public int getSpareCount()
      Overrides:
      getSpareCount in class DefaultPersistentQueryConfiguration
    • assertNoReplicasOrSpares

      public static void assertNoReplicasOrSpares(@NotNull @NotNull PersistentQueryConfiguration config)
      Assert that there is only a single configured worker and no spares for use cases that expect this, like dependencies.
      Parameters:
      config - the configuration
    • getAdminGroups

      @Nullable public @Nullable String[] getAdminGroups()
      Get the groups that are permitted to administer this query.
      Returns:
      an array of groups that are permitted to administer this query
    • setAdminGroups

      public void setAdminGroups(@Nullable @Nullable String[] adminGroups)
      Set the groups that are permitted to administer this query.
      Parameters:
      adminGroups - an array of groups that are permitted to administer this query, this array must not be mutated after calling this method.
    • getViewerGroups

      @Nullable public @Nullable String[] getViewerGroups()
      Get the groups that are permitted to view this query.
      Returns:
      an array of groups that are permitted to view this query
    • setViewerGroups

      public void setViewerGroups(@Nullable @Nullable String[] viewerGroups)
      Set the groups that are permitted to view this query.
      Parameters:
      viewerGroups - an array of groups that are permitted to view this query, this array must not be mutated after calling this method.
    • createFromXmlByteArray

      public static List<PersistentQueryConfiguration> createFromXmlByteArray(byte[] xmlBytes) throws IOException, org.jdom2.JDOMException
      Create a list of PersistentQueryConfiguration instances from a byte array containing XML. The XML should have been created by the corresponding createXmlDocumentFromConfigurations(Collection,BiConsumer) method. There are no guarantees on the type, mutability, serializability, or thread-safety of the returned List.
      Parameters:
      xmlBytes - the byte array containing the XML
      Returns:
      a List of PersistentQueryConfiguration instances
      Throws:
      IOException
      org.jdom2.JDOMException
    • asXmlString

      public String asXmlString()
      Convert this persistent query into an XML String.
      Returns:
      this persistent query represented as an XML string.
    • writeXmlFromConfigurations

      public static void writeXmlFromConfigurations(@NotNull @NotNull Collection<PersistentQueryConfiguration> configurations, Writer outputWriter, BiConsumer<Boolean,PersistentQueryConfiguration> contextCallback)
      Write XML text resenting a collection of persistent query configurations to the specified Writer.
      Parameters:
      configurations - the PersistentQueryConfiguration instances to be written
      outputWriter - the Writer to use for the output
      contextCallback - optional functor that takes a flag and a query configuration, used to annotate informational logging outputs around the processing of each config, true on entry, false on exit, null == no-op.