Class ServerInfo
java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
org.springframework.data.mongodb.monitor.ServerInfo
Expose basic server information via JMX
- Author:
- Mark Pollack, Thomas Darimont, Christoph Strobl
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturns the hostname of the used server reported by MongoDB.doubledoubleMethods inherited from class org.springframework.data.mongodb.monitor.AbstractMonitorgetDb, getMongoClient, getServerStatus, hosts
- 
Constructor Details- 
ServerInfoprotected ServerInfo(com.mongodb.client.MongoClient mongoClient) - Parameters:
- mongoClient-
- Since:
- 2.2
 
 
- 
- 
Method Details- 
getHostName@ManagedOperation(description="Server host name") public String getHostName() throws UnknownHostExceptionReturns the hostname of the used server reported by MongoDB.- Returns:
- the reported hostname can also be an IP address.
- Throws:
- UnknownHostException
 
- 
getUptimeEstimate
- 
getVersion
- 
getLocalTime
- 
getUptime@ManagedMetric(metricType=COUNTER, displayName="Server uptime in seconds", unit="seconds") public double getUptime()
 
-