Class ServerInfo
java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
org.springframework.data.mongodb.monitor.ServerInfo
@Deprecated(since="4.5",
forRemoval=true)
@ManagedResource(description="Server Information")
public class ServerInfo
extends AbstractMonitor
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.5
Expose basic server information via JMX
- Author:
- Mark Pollack, Thomas Darimont, Christoph Strobl
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ServerInfo
(com.mongodb.client.MongoClient mongoClient) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Returns the hostname of the used server reported by MongoDB.Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.springframework.data.mongodb.monitor.AbstractMonitor
getDb, getMongoClient, getServerStatus, hosts
-
Constructor Details
-
ServerInfo
protected ServerInfo(com.mongodb.client.MongoClient mongoClient) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
mongoClient
-- Since:
- 2.2
-
-
Method Details
-
getHostName
@ManagedOperation(description="Server host name") public String getHostName() throws UnknownHostExceptionDeprecated, for removal: This API element is subject to removal in a future version.Returns the hostname of the used server reported by MongoDB.- Returns:
- the reported hostname can also be an IP address.
- Throws:
UnknownHostException
-
getUptimeEstimate
Deprecated, for removal: This API element is subject to removal in a future version. -
getVersion
Deprecated, for removal: This API element is subject to removal in a future version. -
getLocalTime
Deprecated, for removal: This API element is subject to removal in a future version. -
getUptime
@ManagedMetric(metricType=COUNTER, displayName="Server uptime in seconds", unit="seconds") public double getUptime()Deprecated, for removal: This API element is subject to removal in a future version.
-