Example usage for com.mongodb.event ConnectionPoolWaitQueueEnteredEvent getServerId

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

Introduction

In this page you can find the example usage for com.mongodb.event ConnectionPoolWaitQueueEnteredEvent 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 waitQueueEntered(final ConnectionPoolWaitQueueEnteredEvent event) {
    metrics.compute(event.getServerId(), (serverId, metric) -> metric.incWaitQueueSize());
}