Package com.illumon.iris.controller
Class PersistentQueryConfiguration
java.lang.Object
com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
com.illumon.iris.controller.PersistentQueryConfiguration
- All Implemented Interfaces:
com.fishlib.base.Copyable<com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration>
,com.fishlib.base.log.LogOutputAppendable
,com.fishlib.base.SafeCloneable<com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration>
,com.fishlib.dataobjects.persistence.WObjectStreamConstants
,com.fishlib.dataobjects.WAbstractDataObject
,Externalizable
,Serializable
,Cloneable
public class PersistentQueryConfiguration
extends com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
PersistentQueryConfiguration contains the persistent state for a query.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.deephaven.hash.KeyedLongObjectKey<PersistentQueryConfiguration>
Fields inherited from class com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
additionalMemoryInGB, assignmentPolicy, assignmentPolicyParams, classPathAdditions, columnSet_, columnSetName_, completedStatus, configurationType, createdTime, dataBufferPoolToHeapSizeRatio, dbServerName, detailedGCLoggingEnabled, enabled, expirationTime, extraEnvironmentVariables, extraJvmArguments, genericWorkerControl, heapSizeInGB, INDEX_OF_ADDITIONALMEMORYINGB, INDEX_OF_ASSIGNMENTPOLICY, INDEX_OF_ASSIGNMENTPOLICYPARAMS, INDEX_OF_CLASSPATHADDITIONS, INDEX_OF_COMPLETEDSTATUS, INDEX_OF_CONFIGURATIONTYPE, INDEX_OF_CREATEDTIME, INDEX_OF_DATABUFFERPOOLTOHEAPSIZERATIO, INDEX_OF_DBSERVERNAME, INDEX_OF_DETAILEDGCLOGGINGENABLED, INDEX_OF_ENABLED, INDEX_OF_EXPIRATIONTIME, INDEX_OF_EXTRAENVIRONMENTVARIABLES, INDEX_OF_EXTRAJVMARGUMENTS, INDEX_OF_GENERICWORKERCONTROL, INDEX_OF_HEAPSIZEINGB, INDEX_OF_JVMPROFILE, INDEX_OF_KUBERNETESCONTROL, INDEX_OF_LASTMODIFIEDBYAUTHENTICATED, INDEX_OF_LASTMODIFIEDBYEFFECTIVE, INDEX_OF_LASTMODIFIEDTIME, INDEX_OF_NAME, INDEX_OF_OMITDEFAULTGCPARAMETERS, INDEX_OF_OWNER, INDEX_OF_PYTHONCONTROL, INDEX_OF_REPLICACOUNT, INDEX_OF_RESTARTUSERS, INDEX_OF_SCHEDULING, INDEX_OF_SCRIPTCODE, INDEX_OF_SCRIPTLANGUAGE, INDEX_OF_SCRIPTPATH, INDEX_OF_SERIAL, INDEX_OF_SPARECOUNT, INDEX_OF_TIMEOUT, INDEX_OF_TYPESPECIFICFIELDS, INDEX_OF_VERSION, INDEX_OF_WEEPSADMINGROUPS, INDEX_OF_WEEPSVIEWERGROUPS, INDEX_OF_WORKERKIND, jVMProfile, kubernetesControl, lastModifiedByAuthenticated, lastModifiedByEffective, lastModifiedTime, name, omitDefaultGCParameters, owner, pythonControl, replicaCount, restartUsers, RESTARTUSERS_ADMIN, RESTARTUSERS_ADMINANDVIEWERS, RESTARTUSERS_VIEWERSWHENDOWN, scheduling, scriptCode, scriptLanguage, scriptPath, serial, spareCount, timeout, typeSpecificFields, version, weepsAdminGroups, weepsViewerGroups, workerKind
Fields inherited from interface com.fishlib.dataobjects.persistence.WObjectStreamConstants
ADD_CLASS, ADD_COLUMN_SET_CLASS, ADD_ENUM, ADD_ENUM_LONG, ADO_ARRAY_TYPE, ARRAY_TYPE, BOOLEAN_TYPE, BYTE_ARRAY_TYPE, BYTE_TYPE, DATE_TYPE, DOUBLE_ARRAY_TYPE, DOUBLE_TYPE, FLOAT_ARRAY_TYPE, FLOAT_TYPE, INT_ARRAY_TYPE, INTEGER_TYPE, KNOWN_ENUM, KNOWN_ENUM_LONG, LINKED_MAP_TYPE, LINKED_SET_TYPE, LONG_ARRAY_TYPE, LONG_STRING_TYPE, LONG_TYPE, MAP_TYPE, NULL_TYPE, OBJECT_TYPE, SET_TYPE, STRING_ARRAY_TYPE, STRING_TYPE, TREE_MAP_TYPE, TREE_SET_TYPE
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptioncom.fishlib.base.log.LogOutput
append
(com.fishlib.base.log.LogOutput logOutput) com.fishlib.base.log.LogOutput
appendDetailed
(com.fishlib.base.log.LogOutput logOutput) static void
Assert that there is only a single configured worker and no spares for use cases that expect this, like dependencies.Convert this persistent query into an XML String.clone()
static List<PersistentQueryConfiguration>
createFromXmlByteArray
(byte[] xmlBytes) Create a list of PersistentQueryConfiguration instances from a byte array containing XML.boolean
Compare this configuration to another and check the equality of all fields, not just the serial likeequals(Object)
.boolean
double
String[]
Get the groups that are permitted to administer this query.double
int
String[]
getJvmArguments
(ControllerConfigurationType controllerConfigurationType) int
getScriptPathSet
(String owner, UserContext userContext, IrisGroupProvider irisGroupProvider, PersistentQueryScriptSource persistentQueryScriptSource, long serial) int
String[]
Get the groups that are permitted to view this query.int
hashCode()
void
setAdminGroups
(String[] adminGroups) Set the groups that are permitted to administer this query.void
void
setExtraEnvironmentVariablesFromMap
(Map<String, String> extraEnvironmentVariablesMap) void
void
setExtraJvmArgumentsFromList
(List<String> extraJvmArgumentsList) void
void
void
setViewerGroups
(String[] viewerGroups) Set the groups that are permitted to view this query.toString()
void
validate
(Map<Long, PersistentQueryInfo> allConfigurations, PersistentQueryControllerConfiguration serverConfig) static void
writeXmlFromConfigurations
(Collection<PersistentQueryConfiguration> configurations, Writer outputWriter, BiConsumer<Boolean, PersistentQueryConfiguration> contextCallback) Write XML text resenting a collection of persistent query configurations to the specified Writer.Methods inherited from class com.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
copyValues, getAssignmentPolicy, getAssignmentPolicyParams, getByte, getByte, getByte, getClassPathAdditions, getColumnSet, getColumnSetName, getColumnSetStatic, getCompletedStatus, getConfigurationType, getCreatedTime, getDataBufferPoolToHeapSizeRatio, getDate, getDate, getDate, getDbServerName, getDetailedGCLoggingEnabled, getDouble, getDouble, getDouble, getEnabled, getExpirationTime, getExtraEnvironmentVariables, getExtraJvmArguments, getGenericWorkerControl, getInt, getInt, getInt, getJVMProfile, getKubernetesControl, getLastModifiedByAuthenticated, getLastModifiedByEffective, getLastModifiedTime, getLong, getLong, getLong, getName, getOmitDefaultGCParameters, getOwner, getPythonControl, getRestartUsers, getScheduling, getScriptCode, getScriptLanguage, getScriptPath, getSerial, getString, getString, getString, getTimeout, getTypeSpecificFields, getValue, getValue, getValue, getVersion, getWeepsAdminGroups, getWeepsViewerGroups, getWorkerKind, readExternal, safeClone, setAdditionalMemoryInGB, setAssignmentPolicy, setAssignmentPolicyParams, setByte, setByte, setClassPathAdditions, setCompletedStatus, setConfigurationType, setCreatedTime, setDataBufferPoolToHeapSizeRatio, setDate, setDate, setDbServerName, setDetailedGCLoggingEnabled, setDouble, setDouble, setEnabled, setExpirationTime, setExtraEnvironmentVariables, setExtraJvmArguments, setGenericWorkerControl, setHeapSizeInGB, setInt, setInt, setJVMProfile, setKubernetesControl, setLastModifiedByAuthenticated, setLastModifiedByEffective, setLastModifiedTime, setLong, setLong, setName, setOmitDefaultGCParameters, setOwner, setPythonControl, setReplicaCount, setRestartUsers, setScheduling, setScriptCode, setScriptLanguage, setScriptPath, setSerial, setSpareCount, setString, setString, setTimeout, setTypeSpecificFields, setValue, setValue, setVersion, setWeepsAdminGroups, setWeepsViewerGroups, setWorkerKind, writeExternal
-
Field Details
-
CONFIG_SERIAL_KEY
public static final io.deephaven.hash.KeyedLongObjectKey<PersistentQueryConfiguration> CONFIG_SERIAL_KEY
-
-
Constructor Details
-
PersistentQueryConfiguration
public PersistentQueryConfiguration() -
PersistentQueryConfiguration
-
-
Method Details
-
clone
- Specified by:
clone
in interfacecom.fishlib.dataobjects.WAbstractDataObject
- Overrides:
clone
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
toDetailedString
-
toString
- Overrides:
toString
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
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 interfacecom.fishlib.base.log.LogOutputAppendable
- Overrides:
append
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
equals
- Overrides:
equals
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
deepEquals
Compare this configuration to another and check the equality of all fields, not just the serial likeequals(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
public void validate(Map<Long, PersistentQueryInfo> allConfigurations, PersistentQueryControllerConfiguration serverConfig) throws PersistentQueryConfiguration.ValidationFailure -
getHeapSizeInMB
public int getHeapSizeInMB() -
getHeapSizeInGB
public double getHeapSizeInGB()- Overrides:
getHeapSizeInGB
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
getAdditionalMemoryInGB
public double getAdditionalMemoryInGB()- Overrides:
getAdditionalMemoryInGB
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
getJvmArguments
-
getExtraJvmArgumentsAsString
-
setExtraJvmArgumentsFromString
-
getClassPathAdditionsAsString
-
setClassPathAdditionsFromString
-
getExtraJvmArgumentsAsList
-
setExtraJvmArgumentsFromList
-
getExtraEnvironmentVariablesAsString
-
setExtraEnvironmentVariablesFromString
-
setKubernetesControl
-
getExtraEnvironmentVariablesAsMap
-
setExtraEnvironmentVariablesFromMap
-
getReplicaCount
public int getReplicaCount()- Overrides:
getReplicaCount
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
getSpareCount
public int getSpareCount()- Overrides:
getSpareCount
in classcom.illumon.dataobjects.generated.DefaultPersistentQueryConfiguration
-
assertNoReplicasOrSpares
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
Get the groups that are permitted to administer this query.- Returns:
- an array of groups that are permitted to administer this query
-
setAdminGroups
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
Get the groups that are permitted to view this query.- Returns:
- an array of groups that are permitted to view this query
-
setViewerGroups
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 correspondingcreateXmlDocumentFromConfigurations(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
Convert this persistent query into an XML String.- Returns:
- this persistent query represented as an XML string.
-
writeXmlFromConfigurations
public static void writeXmlFromConfigurations(@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 writtenoutputWriter
- the Writer to use for the outputcontextCallback
- 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.
-