Class MongoMetricsConnectionPoolListener

java.lang.Object
com.mongodb.event.ConnectionPoolListenerAdapter
io.micrometer.core.instrument.binder.mongodb.MongoMetricsConnectionPoolListener
All Implemented Interfaces:
com.mongodb.event.ConnectionPoolListener, java.util.EventListener

@NonNullApi
@NonNullFields
@Incubating(since="1.2.0")
public class MongoMetricsConnectionPoolListener
extends com.mongodb.event.ConnectionPoolListenerAdapter
ConnectionPoolListener for collecting connection pool metrics from MongoClient.
Since:
1.2.0
  • Constructor Summary

    Constructors
    Constructor Description
    MongoMetricsConnectionPoolListener​(MeterRegistry registry)  
  • Method Summary

    Modifier and Type Method Description
    void connectionAdded​(com.mongodb.event.ConnectionAddedEvent event)  
    void connectionCheckedIn​(com.mongodb.event.ConnectionCheckedInEvent event)  
    void connectionCheckedOut​(com.mongodb.event.ConnectionCheckedOutEvent event)  
    void connectionPoolClosed​(com.mongodb.event.ConnectionPoolClosedEvent event)  
    void connectionPoolOpened​(com.mongodb.event.ConnectionPoolOpenedEvent event)  
    void connectionRemoved​(com.mongodb.event.ConnectionRemovedEvent event)  
    void waitQueueEntered​(com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent event)  
    void waitQueueExited​(com.mongodb.event.ConnectionPoolWaitQueueExitedEvent event)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MongoMetricsConnectionPoolListener

      public MongoMetricsConnectionPoolListener​(MeterRegistry registry)
  • Method Details

    • connectionPoolOpened

      public void connectionPoolOpened​(com.mongodb.event.ConnectionPoolOpenedEvent event)
      Specified by:
      connectionPoolOpened in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionPoolOpened in class com.mongodb.event.ConnectionPoolListenerAdapter
    • connectionPoolClosed

      public void connectionPoolClosed​(com.mongodb.event.ConnectionPoolClosedEvent event)
      Specified by:
      connectionPoolClosed in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionPoolClosed in class com.mongodb.event.ConnectionPoolListenerAdapter
    • connectionCheckedOut

      public void connectionCheckedOut​(com.mongodb.event.ConnectionCheckedOutEvent event)
      Specified by:
      connectionCheckedOut in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionCheckedOut in class com.mongodb.event.ConnectionPoolListenerAdapter
    • connectionCheckedIn

      public void connectionCheckedIn​(com.mongodb.event.ConnectionCheckedInEvent event)
      Specified by:
      connectionCheckedIn in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionCheckedIn in class com.mongodb.event.ConnectionPoolListenerAdapter
    • waitQueueEntered

      public void waitQueueEntered​(com.mongodb.event.ConnectionPoolWaitQueueEnteredEvent event)
      Specified by:
      waitQueueEntered in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      waitQueueEntered in class com.mongodb.event.ConnectionPoolListenerAdapter
    • waitQueueExited

      public void waitQueueExited​(com.mongodb.event.ConnectionPoolWaitQueueExitedEvent event)
      Specified by:
      waitQueueExited in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      waitQueueExited in class com.mongodb.event.ConnectionPoolListenerAdapter
    • connectionAdded

      public void connectionAdded​(com.mongodb.event.ConnectionAddedEvent event)
      Specified by:
      connectionAdded in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionAdded in class com.mongodb.event.ConnectionPoolListenerAdapter
    • connectionRemoved

      public void connectionRemoved​(com.mongodb.event.ConnectionRemovedEvent event)
      Specified by:
      connectionRemoved in interface com.mongodb.event.ConnectionPoolListener
      Overrides:
      connectionRemoved in class com.mongodb.event.ConnectionPoolListenerAdapter