Class ConnectionMetrics

java.lang.Object
org.springframework.data.mongodb.monitor.AbstractMonitor
org.springframework.data.mongodb.monitor.ConnectionMetrics

@ManagedResource(description="Connection metrics") public class ConnectionMetrics extends AbstractMonitor
JMX Metrics for Connections
Author:
Mark Pollack
  • Constructor Details

    • ConnectionMetrics

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

    • getCurrent

      @ManagedMetric(metricType=GAUGE, displayName="Current Connections") public int getCurrent()
    • getAvailable

      @ManagedMetric(metricType=GAUGE, displayName="Available Connections") public int getAvailable()