public abstract class AbstractMonitorable<T> extends Object implements Monitorable<T>
Monitorable. Provides implementations for
metadata methods and a high performance synchronization-free implementation of Monitor
notification.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOG |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMonitorable(String name,
String description,
Class<T> type,
javax.measure.Unit<?> unit,
ValueSemantics semantics) |
| Modifier and Type | Method and Description |
|---|---|
void |
attachMonitor(Monitor monitor)
Attaches the provided Monitor.
|
String |
getDescription() |
String |
getName() |
ValueSemantics |
getSemantics() |
Class<T> |
getType() |
javax.measure.Unit<?> |
getUnit() |
protected void |
logValue() |
protected void |
notifyMonitors() |
protected void |
registerSelf(MonitorableRegistry registry) |
void |
removeMonitor(Monitor monitor)
Removed the provided Monitor from the list of attached Monitors.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetprotected AbstractMonitorable(String name, String description, Class<T> type, javax.measure.Unit<?> unit, ValueSemantics semantics)
protected void registerSelf(MonitorableRegistry registry)
public String getName()
getName in interface Monitorable<T>public String getDescription()
getDescription in interface Monitorable<T>public Class<T> getType()
getType in interface Monitorable<T>Monitorable.get() method.public javax.measure.Unit<?> getUnit()
getUnit in interface Monitorable<T>AbstractUnit.ONE;
values for which no unit is sensible (e.g. String values) may
return null.public ValueSemantics getSemantics()
getSemantics in interface Monitorable<T>public void attachMonitor(Monitor monitor)
MonitorableattachMonitor in interface Monitorable<T>monitor - the Monitor to attach.public void removeMonitor(Monitor monitor)
MonitorableremoveMonitor in interface Monitorable<T>monitor - the Monitor to remove.protected final void notifyMonitors()
protected final void logValue()
Copyright © 2009–2019 Performance Co-Pilot. All rights reserved.