class MetricsHandler extends PipelinedHandler {

    MetricRegistry getMetricsRegistry(MongoRequest request, METRICS_GATHERING_LEVEL metricsLevel) {
        switch (metricsLevel) {
            case ROOT:
                return metrics.registry();
            case DATABASE:
                return metrics.registry(request.getDBName());
            case COLLECTION:
                return metrics.registry(request.getDBName(), request.getCollectionName());
            default:
                return null;
        }
    }

    public  MetricsHandler();
    public  MetricsHandler(PipelinedHandler next);

}