Example usage for com.mongodb.event ConnectionPoolOpenedEvent getServerId

List of usage examples for com.mongodb.event ConnectionPoolOpenedEvent getServerId

Introduction

In this page you can find the example usage for com.mongodb.event ConnectionPoolOpenedEvent getServerId.

Prototype

public ServerId getServerId() 

Source Link

Document

Gets the server id

Usage

From source file:org.eclipse.ditto.services.utils.persistence.mongo.monitoring.KamonConnectionPoolListener.java

License:Open Source License

@Override
public void connectionPoolOpened(final ConnectionPoolOpenedEvent event) {
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Connection pool opened: {}", event);
    }//from  w ww .j  a v a  2  s  .  co m
    final PoolMetric metric = new PoolMetric(event.getServerId());
    metrics.put(event.getServerId(), metric);
}