Class AbstractMonitor

java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
Direct Known Subclasses:
AssertMetrics, BackgroundFlushingMetrics, BtreeIndexCounters, ConnectionMetrics, GlobalLockMetrics, MemoryMetrics, OperationCounters, ServerInfo

public abstract class AbstractMonitor extends Object
Base class to encapsulate common configuration settings when connecting to a database
Author:
Mark Pollack, Oliver Gierke, Christoph Strobl
  • Constructor Details

    • AbstractMonitor

      protected AbstractMonitor(com.mongodb.client.MongoClient mongoClient)
      Parameters:
      mongoClient - must not be null.
      Since:
      2.2
  • Method Details

    • getServerStatus

      public org.bson.Document getServerStatus()
    • getDb

      public com.mongodb.client.MongoDatabase getDb(String databaseName)
    • getMongoClient

      protected com.mongodb.client.MongoClient getMongoClient()
    • hosts

      protected List<com.mongodb.ServerAddress> hosts()