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