Interface PerformanceLoggingConfiguration


  • public interface PerformanceLoggingConfiguration
    This interface represents the Intelligence Server Performance Logging Configuration. A Performance Logging Configuration consists of a number of LogCategories. Each such LogCategory can have several LogCounters. An Intelligence Server has a default Performance Logging configuration. Also each Server Instance has its own Performance Logging configuration. This interface can represent both default and (server) instance configuration. Also, an instance configuration can be configured to use the default configuration. Through this interface one can query the categories-counters and configure their logging. Any configuration changes made need to be saved using save(boolean) methods to ensure that they are saved and applied.
    Since:
    MicroStrategy Web 7.5.2
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void disableLogging​(java.lang.String cat, java.lang.String counter)
      Disables logging for the counter passed.
      void disableLogStats​(java.lang.String cat, java.lang.String counter)
      Disables logging to statistics for the counter passed.
      void enableLogging​(java.lang.String cat, java.lang.String counter)
      Enables logging for the counter passed.
      void enableLogStats​(java.lang.String cat, java.lang.String counter)
      Enables logging to statistics for the counter passed.
      LogCategories getCategories()
      Returns the LogCategories for the server instance or for the IServer (if this is the default configuration).
      LogDestination getDestination()
      Returns the log destination for this configuration.
      int getLoggingFrequency()
      Returns the logging frequency.
      int getStatsFrequency()
      Returns the frequency log performance counters to statistics.
      boolean getUseDefault()
      Conveys whether this performance logging configuration has been configured to use the default configuration for the IServer.
      boolean isDefault()
      Conveys if this configuration represents the default performance logging configuration for the IServer.
      boolean isLoggingEnabled()
      Returns whether performance logging is enabled for this instance.
      boolean isLogStatistics()
      Returns whether log performance counters to statistics.
      void refreshServerConfiguration()
      Refreshes the server's performance logging configuration.
      void save()
      Saves any changes done to the configuration since the last update (or save).
      void save​(boolean applyRuntime)
      Saves any changes done to the configuration since the last update (or save).
      void setDestination​(LogDestination dest)
      Sets the logging destination for this configuration.
      void setLoggingEnabled​(boolean isEnabled)
      Sets whether performance logging is enabled for the instance.
      void setLoggingFrequency​(int freq)
      Sets the logging frequency.
      void setLogStatistics​(boolean _isLogStatistics)
      Sets whether log performance counters to statistics.
      void setStatsFrequency​(int freq)
      Sets the frequency log performance counters to statistics.
      void setUseDefault​(boolean useDefault)
      Configures the owner server instance to use the default performance logging configuration of the IServer or not.
    • Method Detail

      • getCategories

        LogCategories getCategories()
        Returns the LogCategories for the server instance or for the IServer (if this is the default configuration).
        Returns:
        LogCategories the categories for the server instance (or IServer, if this is the default configurtion).
      • enableLogging

        void enableLogging​(java.lang.String cat,
                           java.lang.String counter)
        Enables logging for the counter passed. Note that after enabling (or disabling) counters save(boolean) should be called to save the changes to IServer.
        Parameters:
        cat - the category name
        counter - the counter name
      • disableLogging

        void disableLogging​(java.lang.String cat,
                            java.lang.String counter)
        Disables logging for the counter passed. Note that after enabling (or disabling) counters save(boolean) should be called to save the changes to IServer.
        Parameters:
        cat - the category name
        counter - the counter name
      • getLoggingFrequency

        int getLoggingFrequency()
        Returns the logging frequency.
        Returns:
        int the logging frequency
      • setLoggingFrequency

        void setLoggingFrequency​(int freq)
        Sets the logging frequency. The new value is saved on the IServer only upon next call to save(boolean).
        Parameters:
        freq -
      • getUseDefault

        boolean getUseDefault()
        Conveys whether this performance logging configuration has been configured to use the default configuration for the IServer. This method is normally applicable to performance logging configuration of a Server Instance only, as they can be configured to use the default configuration of the IServer rather than their own configuration. If this performance logging configuration represents a default configuration itself, this method will return True.
        Returns:
        boolean
      • setUseDefault

        void setUseDefault​(boolean useDefault)
        Configures the owner server instance to use the default performance logging configuration of the IServer or not. If useDefault is set to True, the server instance will use the default configuration (instead of its own configuration) else it will use its own configuration. Changes made should be saved using save(boolean). Note that this method is relevant only if this configuration represents the configuration for an individual server instance. if this configuration represents a default configuration, setting useDefault to True represents a no-operation. Since a default configuration will always continue to use only its configuration, setting useDefault to False on it, will however, result in Error.
        Parameters:
        useDefault - if this configuration should use the default configuration for the IServer.
        Throws:
        java.lang.UnsupportedOperationException - if [1] this configuration represents a default configuration and [2] an attempt is made to configure it to not use the default configuration (i.e. useDefault is passed as False).
      • save

        void save​(boolean applyRuntime)
           throws ServerConfigException
        Saves any changes done to the configuration since the last update (or save). If applyRuntime is set to false, the saved changes will be effected on IServer only upon subsequent restart. If set to True, the changes will however be applied on IServer immediately.
        Parameters:
        applyRuntime - if True, asks IServer to apply the saved changes to configuration immediately. If this configuration represents a default configuration, and this is set to True, all server instances using the default performance logging configuration will thus, start using the new changes immediately upon save.
        Throws:
        ServerConfigException - If an error was encountered while saving the changes.
      • save

        void save()
           throws ServerConfigException
        Saves any changes done to the configuration since the last update (or save). The saved changes will be effected on IServer only upon subsequent restart.
        Throws:
        ServerConfigException - If an error was encountered while saving the changes.
      • isDefault

        boolean isDefault()
        Conveys if this configuration represents the default performance logging configuration for the IServer.
        Returns:
        boolean True if this configuration represents the default performance logging configuration for the IServer. If not (i.e. this configuration corresponds to an individual server instance on the IServer), False is returned.
      • setDestination

        void setDestination​(LogDestination dest)
        Sets the logging destination for this configuration. Note that the changes won't be saved to IServer till subsequent call to save(boolean).
        Parameters:
        dest - the log destination.
      • isLoggingEnabled

        boolean isLoggingEnabled()
        Returns whether performance logging is enabled for this instance. This acts as a global switch for performance logging on this instance.
        Returns:
        True if performance logging is enabled, false otherwise.
      • setLoggingEnabled

        void setLoggingEnabled​(boolean isEnabled)
        Sets whether performance logging is enabled for the instance. This is a global switch for performance logging on this instance.
        Parameters:
        isEnabled - True if performance logging is enabled, false otherwise.
      • refreshServerConfiguration

        void refreshServerConfiguration()
                                 throws ServerConfigException
        Refreshes the server's performance logging configuration. The server will re-read the performance logging configuration from storage and load that configuration into the running Intelligence Server instance.
        Throws:
        ServerConfigException - Thrown if an error occurs.
        Since:
        MicroStrategy Web 8.0.1
      • isLogStatistics

        boolean isLogStatistics()
        Returns whether log performance counters to statistics.
        Returns:
        True if log performance counters to statistics, False if not log performance counters to statistics.
        Since:
        MicroStrategy Web 9.0.0
      • getStatsFrequency

        int getStatsFrequency()
        Returns the frequency log performance counters to statistics.
        Returns:
        int the frequency log performance counters to statistics
        Since:
        MicroStrategy Web 9.0.0
      • setLogStatistics

        void setLogStatistics​(boolean _isLogStatistics)
        Sets whether log performance counters to statistics.
        Parameters:
        _isLogStatistics - True if log performance counters to statistics, False otherwise.
        Since:
        MicroStrategy Web 9.0.0
      • setStatsFrequency

        void setStatsFrequency​(int freq)
        Sets the frequency log performance counters to statistics. The new value is saved on the IServer only upon next call to save(boolean).
        Parameters:
        freq -
        Since:
        MicroStrategy Web 9.0.0
      • enableLogStats

        void enableLogStats​(java.lang.String cat,
                            java.lang.String counter)
                     throws java.lang.IllegalArgumentException
        Enables logging to statistics for the counter passed. Note that after enabling (or disabling) counters save(boolean) should be called to save the changes to IServer.
        Parameters:
        cat - the category name
        counter - the counter name
        Throws:
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 9.0.0
      • disableLogStats

        void disableLogStats​(java.lang.String cat,
                             java.lang.String counter)
                      throws java.lang.IllegalArgumentException
        Disables logging to statistics for the counter passed. Note that after enabling (or disabling) counters save(boolean) should be called to save the changes to IServer.
        Parameters:
        cat - the category name
        counter - the counter name
        Throws:
        java.lang.IllegalArgumentException
        Since:
        MicroStrategy Web 9.0.0