public abstract class AbstractLoadMetric extends Object implements LoadMetric
LoadMetric
implementation with basic mutators/accessors.DEFAULT_CAPACITY, DEFAULT_WEIGHT
Constructor and Description |
---|
AbstractLoadMetric() |
Modifier and Type | Method and Description |
---|---|
double |
getCapacity()
Returns the load capacity of this metric.
|
int |
getWeight()
Returns the "weight" of this metric, i.e.
|
void |
setCapacity(double capacity)
Sets the maximum capacity of this metric.
|
void |
setWeight(int weight)
Sets the weight of the metric relative to the other metrics.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoad
public int getWeight()
LoadMetricMBean
getWeight
in interface LoadMetricMBean
public void setWeight(int weight)
LoadMetricMBean
setWeight
in interface LoadMetricMBean
weight
- weight of the metric.public double getCapacity()
LoadMetricMBean
LoadMetric.getLoad(org.jboss.modcluster.container.Engine)
expressed as a
percentage of the capacity, such that: 0 <= (LoadMetric.getLoad(org.jboss.modcluster.container.Engine)
/ LoadMetricMBean.getCapacity()
) < 1getCapacity
in interface LoadMetricMBean
public void setCapacity(double capacity)
LoadMetricMBean
setCapacity
in interface LoadMetricMBean
capacity
- non-negative capacity of the metric.Copyright © 2023 JBoss by Red Hat. All rights reserved.