public final class SemaphoreMeter extends AbstractMeter implements SemaphoreSensor
Constructor and Description |
---|
SemaphoreMeter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
acquire()
Acquire a resource from the semaphore.
|
double |
calculate()
Calculate the current value based on the previous sample().
|
AbstractMeter |
createCount(java.lang.String name) |
AbstractMeter |
createMax(java.lang.String name) |
AbstractMeter |
createMin(java.lang.String name) |
void |
release()
Free a resource
|
void |
sample()
Return the probe's next average.
|
double |
sampleCount()
Return the probe's next sample.
|
double |
sampleMax()
Return the probe's next sample.
|
double |
sampleMin()
Return the probe's next sample.
|
getName, peek, toString
public AbstractMeter createCount(java.lang.String name)
public AbstractMeter createMin(java.lang.String name)
public AbstractMeter createMax(java.lang.String name)
public final void acquire()
SemaphoreSensor
acquire
in interface SemaphoreSensor
public final void release()
SemaphoreSensor
release
in interface SemaphoreSensor
public final void sample()
sample
in interface Meter
sample
in class AbstractMeter
public final double calculate()
AbstractMeter
calculate
in interface Meter
calculate
in class AbstractMeter
public final double sampleCount()
public final double sampleMax()
public final double sampleMin()