public class MetricAdmin extends Object implements MetricAdminMBean
| Constructor and Description |
|---|
MetricAdmin() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableMetrics()
Disables the metric collector at the AWS SDK level.
|
boolean |
enableDefaultMetrics()
Starts the default AWS SDK metric collector, but only if no metric
collector is currently in use at the AWS SDK level.
|
String |
getCredentialFile()
Returns the last set AWS credential file; or null if there is none.
|
String |
getHostMetricName()
Returns the host name for metric purposes.
|
String |
getJvmMetricName()
Returns the JVM metric name.
|
String |
getMetricNameSpace()
Returns the metric name space.
|
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.
|
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.
|
String |
getRegion()
Returns the region configured for the default AWS SDK metric collector;
or null if the default is to be used.
|
String |
getRequestMetricCollector()
Returns the name of the request metric collector set at the AWS SDK
level, or NONE if there is none.
|
String |
getServiceMetricCollector()
Returns the name of the service metric collector set at the AWS SDK
level, or NONE if there is none.
|
boolean |
isMachineMetricsExcluded()
Returns true if machine metrics is to be excluded; false otherwise.
|
boolean |
isMetricsEnabled()
Returns true if metrics at the AWS SDK level is enabled; false if
disabled.
|
boolean |
isPerHostMetricsIncluded()
Returns true if per-host metrics is to be included; false otherwise.
|
boolean |
isSingleMetricNamespace()
Returns true if single metric name space is to be used; false otherwise.
|
void |
setCredentialFile(String filepath)
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 excludeJvmMetrics)
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 |
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.
|
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.
|
public boolean enableDefaultMetrics()
MetricAdminMBeanenableDefaultMetrics in interface MetricAdminMBeanpublic void disableMetrics()
MetricAdminMBeandisableMetrics in interface MetricAdminMBeanpublic String getRequestMetricCollector()
MetricAdminMBeangetRequestMetricCollector in interface MetricAdminMBeanpublic String getServiceMetricCollector()
MetricAdminMBeangetServiceMetricCollector in interface MetricAdminMBeanpublic boolean isMetricsEnabled()
MetricAdminMBeanisMetricsEnabled in interface MetricAdminMBeanpublic boolean isMachineMetricsExcluded()
MetricAdminMBeanisMachineMetricsExcluded in interface MetricAdminMBeanpublic void setMachineMetricsExcluded(boolean excludeJvmMetrics)
MetricAdminMBeansetMachineMetricsExcluded in interface MetricAdminMBeanexcludeJvmMetrics - true if JVM metrics is to be excluded; false otherwise.public String getRegion()
MetricAdminMBeangetRegion in interface MetricAdminMBeanpublic void setRegion(String region)
MetricAdminMBeansetRegion in interface MetricAdminMBeanpublic Integer getMetricQueueSize()
MetricAdminMBeangetMetricQueueSize in interface MetricAdminMBeanpublic void setMetricQueueSize(Integer metricQueueSize)
MetricAdminMBeansetMetricQueueSize in interface MetricAdminMBeanpublic Integer getQueuePollTimeoutMilli()
MetricAdminMBeangetQueuePollTimeoutMilli in interface MetricAdminMBeanpublic void setQueuePollTimeoutMilli(Integer timeoutMilli)
MetricAdminMBeansetQueuePollTimeoutMilli in interface MetricAdminMBeanpublic String getMetricNameSpace()
MetricAdminMBeangetMetricNameSpace in interface MetricAdminMBeanpublic void setMetricNameSpace(String metricNameSpace)
MetricAdminMBeansetMetricNameSpace in interface MetricAdminMBeanpublic boolean isPerHostMetricsIncluded()
MetricAdminMBeanisPerHostMetricsIncluded in interface MetricAdminMBeanpublic void setPerHostMetricsIncluded(boolean includePerHostMetrics)
MetricAdminMBeansetPerHostMetricsIncluded in interface MetricAdminMBeanincludePerHostMetrics - true if per-host metrics is to be included; false otherwise.public String getJvmMetricName()
MetricAdminMBeangetJvmMetricName in interface MetricAdminMBeanpublic void setJvmMetricName(String jvmMetricName)
MetricAdminMBeansetJvmMetricName in interface MetricAdminMBeanpublic String getHostMetricName()
MetricAdminMBeanInetAddress.getHostMetricName in interface MetricAdminMBeanpublic void setHostMetricName(String hostMetricName)
MetricAdminMBeanInetAddress.setHostMetricName in interface MetricAdminMBeanpublic String getCredentialFile()
MetricAdminMBeangetCredentialFile in interface MetricAdminMBeanpublic void setCredentialFile(String filepath) throws FileNotFoundException, IOException
MetricAdminMBeansetCredentialFile in interface MetricAdminMBeanfilepath - must be a valid path to an AWS credential property file.FileNotFoundExceptionIOExceptionpublic boolean isSingleMetricNamespace()
MetricAdminMBeanisSingleMetricNamespace in interface MetricAdminMBeanpublic void setSingleMetricNamespace(boolean singleMetricNamespace)
MetricAdminMBeansetSingleMetricNamespace in interface MetricAdminMBean