org.springframework.data.mongodb.monitor
Class ServerInfo
java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
org.springframework.data.mongodb.monitor.ServerInfo
@ManagedResource(description="Server Information")
public class ServerInfo
- extends AbstractMonitor
Expose basic server information via JMX
- Author:
- Mark Pollack
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerInfo
public ServerInfo(Mongo mongo)
getHostName
@ManagedOperation(description="Server host name")
public String getHostName()
throws UnknownHostException
- Throws:
UnknownHostException
getUptimeEstimate
@ManagedMetric(displayName="Uptime Estimate")
public double getUptimeEstimate()
getVersion
@ManagedOperation(description="MongoDB Server Version")
public String getVersion()
getLocalTime
@ManagedOperation(description="Local Time")
public String getLocalTime()
getUptime
@ManagedMetric(metricType=COUNTER,
displayName="Server uptime in seconds",
unit="seconds")
public double getUptime()
Copyright © 2012. All Rights Reserved.