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

    Constructors
    Modifier
    Constructor
    Description
    protected
    ServerInfo(com.mongodb.client.MongoClient mongoClient)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 UnknownHostException
      Deprecated, 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

      @ManagedMetric(displayName="Uptime Estimate") public double getUptimeEstimate()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getVersion

      @ManagedOperation(description="MongoDB Server Version") public String getVersion()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getLocalTime

      @ManagedOperation(description="Local Time") public String 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.