Package com.illumon.iris.controller
Class PersistentQueryControllerConfiguration
java.lang.Object
com.illumon.iris.controller.PersistentQueryControllerConfiguration
- All Implemented Interfaces:
Serializable
Class to hold serializable persistent query controller configuration information; used by the controller and any client which
needs access to the controller's configuration information.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentQueryControllerConfiguration
(int maxHeapSizeInGB, double minDataBufferPoolToHeapSizeRatio, double maxDataBufferPoolToHeapSizeRatio, Map<String, PersistentQueryDbServerConfig> dbServerNames, Map<String, ConsoleConfigurationType> configurationTypes, Map<String, ControllerTemporaryQueueDetails> temporaryQueueDetails, String defaultTemporaryQueueName, String[] defaultSchedulingDetails, int schedulingLookForwardDays, Set<String> jvmProfileNames, String defaultJvmProfileName, PublicKey publicKey, Map<String, Set<String>> consoleServerGroups, String dataRoutingImplementationName, Collection<RoutingConfigurationInfo> tableDataServiceConfigs, Collection<RoutingConfigurationInfo> dataImportServerConfigs, Collection<RoutingConfigurationInfo> logAggregatorServiceConfigs, Map<String, AssignmentPolicyConfig> assignmentPolicies, String defaultAssignmentPolicyName, String defaultAssignmentPolicyParams) -
Method Summary
Modifier and TypeMethodDescriptiongetAllowedServerClassesForUser
(IrisUserContext userContext) Return the list of DIS instances.int
String[]
getDisplayableConfigurationTypes
(IrisUserContext userContext) Get the Map of configuration types that are displayable and editable.Return a collection of log aggregator service instances.double
static double
getMaxHeapGBForServer
(PersistentQueryControllerConfiguration controllerConfiguration, String dbServerName) Return the maximum heap size in GB for a db server for a possibly-null PersistentQueryControllerConfiguration.double
getMaxHeapGBForServer
(String dbServerName) Return the maximum heap size in GB for a db server.double
int
getServerNamesForClasses
(String[] serverClasses) Get the server names applicable for specified array of server classesgetServerNamesForClasses
(Collection<String> serverClasses) Get the server names applicable for specified collection of server classesboolean
isAllowedUserForQuery
(ConfigurationType consoleConfigurationType, UserContext userContext, IrisGroupProvider groupProvider) Determine whether the user is allowed to add or modify the specified configuration typemakeServerConfiguration
(ControllerReloadableConfiguration reloadableConfig)
-
Constructor Details
-
PersistentQueryControllerConfiguration
public PersistentQueryControllerConfiguration(int maxHeapSizeInGB, double minDataBufferPoolToHeapSizeRatio, double maxDataBufferPoolToHeapSizeRatio, Map<String, PersistentQueryDbServerConfig> dbServerNames, Map<String, ConsoleConfigurationType> configurationTypes, Map<String, ControllerTemporaryQueueDetails> temporaryQueueDetails, String defaultTemporaryQueueName, String[] defaultSchedulingDetails, int schedulingLookForwardDays, Set<String> jvmProfileNames, String defaultJvmProfileName, PublicKey publicKey, Map<String, Set<String>> consoleServerGroups, String dataRoutingImplementationName, @NotNull Collection<RoutingConfigurationInfo> tableDataServiceConfigs, @NotNull Collection<RoutingConfigurationInfo> dataImportServerConfigs, @NotNull Collection<RoutingConfigurationInfo> logAggregatorServiceConfigs, @NotNull Map<String, AssignmentPolicyConfig> assignmentPolicies, @NotNull String defaultAssignmentPolicyName, @NotNull String defaultAssignmentPolicyParams)
-
-
Method Details
-
getMinDataBufferPoolToHeapSizeRatio
public double getMinDataBufferPoolToHeapSizeRatio() -
getMaxDataBufferPoolToHeapSizeRatio
public double getMaxDataBufferPoolToHeapSizeRatio() -
getDbServerNames
-
getDbServers
-
getConfigurationTypes
-
getDefaultSchedulingDetails
-
getSchedulingLookForwardDays
public int getSchedulingLookForwardDays() -
getJvmProfileNames
-
getDefaultJvmProfileName
-
getServerTypeToGroupsMap
-
getDefaultMaxHeapSizeGb
public int getDefaultMaxHeapSizeGb() -
getMaxHeapGBForServer
public static double getMaxHeapGBForServer(@Nullable PersistentQueryControllerConfiguration controllerConfiguration, @NotNull String dbServerName) Return the maximum heap size in GB for a db server for a possibly-null PersistentQueryControllerConfiguration. If the controller configuration is null, then the maximum possible heap size is used. Otherwise, if the server name is found in the server map, return that server's value, otherwise return the default maximum.- Parameters:
dbServerName
- the server name- Returns:
- the maximum heap in GB
-
getMaxHeapGBForServer
Return the maximum heap size in GB for a db server. If the server name is found in the server map, return that server's value, otherwise return the default maximum.- Parameters:
dbServerName
- the server name- Returns:
- the maximum heap in GB
-
getServerNamesForClasses
Get the server names applicable for specified collection of server classes- Parameters:
serverClasses
- the server classes for which to retrieve the names- Returns:
- a List of valid server names
-
getServerNamesForClasses
Get the server names applicable for specified array of server classes- Parameters:
serverClasses
- the server classes for which to retrieve the names- Returns:
- a List of valid server names
-
getDisplayableConfigurationTypes
public Map<String,ConsoleConfigurationType> getDisplayableConfigurationTypes(IrisUserContext userContext) Get the Map of configuration types that are displayable and editable. A configuration type is displayable based on its entry from the configuration types XML file:- if its element does not change the default displayable="true" attribute to indicate false, and
- if its element has an allowedGroups attribute, the user must be a superuser or member of that group
- Parameters:
userContext
- an IrisUserContext used to determine group memberships- Returns:
- a Map of configuration names to ConsoleConfigurationType instances
-
isAllowedUserForQuery
public boolean isAllowedUserForQuery(ConfigurationType consoleConfigurationType, UserContext userContext, IrisGroupProvider groupProvider) Determine whether the user is allowed to add or modify the specified configuration type- Parameters:
consoleConfigurationType
- the configuration typeuserContext
- an IrisUserContext used to determine group memberships- Returns:
- true if the specified user context is allowed to create and edit the specified configuration type
-
getTemporaryQueueNames
-
getDefaultTemporaryQueueName
-
getTemporaryQueueDetails
-
getPublicKey
-
getConsoleServerGroups
-
getDataRoutingImplementationName
-
getTableDataServiceInfoConfigs
-
getDataImportServerConfigs
Return the list of DIS instances.- Returns:
- a collection of DIS names, tags, and optional descriptions
-
getLogAggregatorServiceConfigs
Return a collection of log aggregator service instances.- Returns:
- a collection of log aggregator service names and optional descriptions
-
getAllowedServerClassesForUser
-
getAssignmentPolicies
-
getDefaultAssignmentPolicyParams
-
getDefaultAssignmentPolicyName
-
makeServerConfiguration
public static PersistentQueryControllerConfiguration makeServerConfiguration(ControllerReloadableConfiguration reloadableConfig)
-