Interface MetricAdminMBean

All Known Implementing Classes:
MetricAdmin

public interface MetricAdminMBean
MBean interface for AwsSdkMetrics administration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disables the metric collector at the AWS SDK level.
    boolean
    Starts the default AWS SDK metric collector, but only if no metric collector is currently in use at the AWS SDK level.
    Returns the last set AWS credential file; or null if there is none.
    Returns the host name for metric purposes.
    Returns the JVM metric name.
    Returns the metric name space.
    Returns the internal metric queue size to be used for the default AWS SDK metric collector; or null if the default is to be used.
    Returns the internal metric queue timeout in millisecond to be used for the default AWS SDK metric collector; or null if the default is to be used.
    Returns the region configured for the default AWS SDK metric collector; or null if the default is to be used.
    Returns the name of the request metric collector set at the AWS SDK level, or NONE if there is none.
    Returns the name of the service metric collector set at the AWS SDK level, or NONE if there is none.
    boolean
    Returns true if machine metrics is to be excluded; false otherwise.
    boolean
    Returns true if metrics at the AWS SDK level is enabled; false if disabled.
    boolean
    Returns true if per-host metrics is to be included; false otherwise.
    boolean
    Returns true if single metric name space is to be used; false otherwise.
    void
    Sets the AWS credential file used by the default AWS SDK metric collector for accessing CloudWatch.
    void
    setHostMetricName(String hostMetricName)
    Sets the host name to enable per-host level metrics generation.
    void
    setJvmMetricName(String jvmMetricName)
    Sets the JVM metric name to enable per-JVM level metrics generation.
    void
    setMachineMetricsExcluded(boolean excludeMachineMetrics)
    Used to set whether the JVM metrics is to be excluded.
    void
    setMetricNameSpace(String metricNameSpace)
    Sets the metric name space.
    void
    setMetricQueueSize(Integer metricQueueSize)
    Sets the metric queue size to be used for the default AWS SDK metric collector; or null if the default is to be used.
    void
    setPerHostMetricsIncluded(boolean includePerHostMetrics)
    Used to set whether the per-host metrics is to be included.
    void
    Sets the queue poll time in millisecond to be used for the default AWS SDK metric collector; or null if the default is to be used.
    void
    setRegion(String region)
    Sets the region to be used for the default AWS SDK metric collector; or null if the default is to be used.
    void
    setSingleMetricNamespace(boolean singleMetricNamespace)
    Used to set whether a single metric name space is to be used.
  • Method Details

    • isMetricsEnabled

      boolean isMetricsEnabled()
      Returns true if metrics at the AWS SDK level is enabled; false if disabled.
    • getRequestMetricCollector

      String getRequestMetricCollector()
      Returns the name of the request metric collector set at the AWS SDK level, or NONE if there is none.
    • getServiceMetricCollector

      String getServiceMetricCollector()
      Returns the name of the service metric collector set at the AWS SDK level, or NONE if there is none.
    • enableDefaultMetrics

      boolean enableDefaultMetrics()
      Starts the default AWS SDK metric collector, but only if no metric collector is currently in use at the AWS SDK level.
      Returns:
      true if the default AWS SDK metric collector has been successfully started by this call; false otherwise.
    • disableMetrics

      void disableMetrics()
      Disables the metric collector at the AWS SDK level.
    • isMachineMetricsExcluded

      boolean isMachineMetricsExcluded()
      Returns true if machine metrics is to be excluded; false otherwise.
    • setMachineMetricsExcluded

      void setMachineMetricsExcluded(boolean excludeMachineMetrics)
      Used to set whether the JVM metrics is to be excluded.
      Parameters:
      excludeMachineMetrics - true if JVM metrics is to be excluded; false otherwise.
    • isPerHostMetricsIncluded

      boolean isPerHostMetricsIncluded()
      Returns true if per-host metrics is to be included; false otherwise.
    • setPerHostMetricsIncluded

      void setPerHostMetricsIncluded(boolean includePerHostMetrics)
      Used to set whether the per-host metrics is to be included.
      Parameters:
      includePerHostMetrics - true if per-host metrics is to be included; false otherwise.
    • getRegion

      String getRegion()
      Returns the region configured for the default AWS SDK metric collector; or null if the default is to be used.
    • setRegion

      void setRegion(String region)
      Sets the region to be used for the default AWS SDK metric collector; or null if the default is to be used.
    • getCredentialFile

      String getCredentialFile()
      Returns the last set AWS credential file; or null if there is none.
    • setCredentialFile

      void setCredentialFile(String filepath) throws FileNotFoundException, IOException
      Sets the AWS credential file used by the default AWS SDK metric collector for accessing CloudWatch.
      Parameters:
      filepath - must be a valid path to an AWS credential property file.
      Throws:
      FileNotFoundException
      IOException
    • getMetricQueueSize

      Integer getMetricQueueSize()
      Returns the internal metric queue size to be used for the default AWS SDK metric collector; or null if the default is to be used.
    • setMetricQueueSize

      void setMetricQueueSize(Integer metricQueueSize)
      Sets the metric queue size to be used for the default AWS SDK metric collector; or null if the default is to be used.
    • getQueuePollTimeoutMilli

      Integer getQueuePollTimeoutMilli()
      Returns the internal metric queue timeout in millisecond to be used for the default AWS SDK metric collector; or null if the default is to be used. Use Integer instead of Long as it seems jconsole does not handle Long properly.
    • setQueuePollTimeoutMilli

      void setQueuePollTimeoutMilli(Integer timeoutMilli)
      Sets the queue poll time in millisecond to be used for the default AWS SDK metric collector; or null if the default is to be used. Use Integer instead of Long as it seems jconsole does not handle Long properly.
    • getMetricNameSpace

      String getMetricNameSpace()
      Returns the metric name space.
    • setMetricNameSpace

      void setMetricNameSpace(String metricNameSpace)
      Sets the metric name space.
      Throws:
      IllegalArgumentException - if the given name space is either null or blank.
    • getJvmMetricName

      String getJvmMetricName()
      Returns the JVM metric name. If the returned value is either null or blank, no JVM level metrics will be generated.
    • setJvmMetricName

      void setJvmMetricName(String jvmMetricName)
      Sets the JVM metric name to enable per-JVM level metrics generation. If the given value is either null or blank, no JVM level metrics will be generated.
    • getHostMetricName

      String getHostMetricName()
      Returns the host name for metric purposes. If the returned value is either null or blank, the host name will be automatically detected via InetAddress.
    • setHostMetricName

      void setHostMetricName(String hostMetricName)
      Sets the host name to enable per-host level metrics generation. If the given value is either null or blank but the per-host metric is enabled, the host name will be automatically detected via InetAddress.
    • isSingleMetricNamespace

      boolean isSingleMetricNamespace()
      Returns true if single metric name space is to be used; false otherwise.
    • setSingleMetricNamespace

      void setSingleMetricNamespace(boolean singleMetricNamespace)
      Used to set whether a single metric name space is to be used.