ReactiveCouchbase / ReactiveCouchbase-core

Core library for ReactiveCouchbase
Apache License 2.0
64 stars 28 forks source link

Pull request #46

Closed zbintliff closed 9 years ago

zbintliff commented 9 years ago

Added 4 things:

  1. Exposed internals of AsyncHttpClient:
    1. Can now setMaximumConnectionsTotal
    2. Can now setMasimumConnectionsPerHost
  2. Exposed in CouchbaseClient
    1. Can set MetricType to MetricType.OFF, MetricType.PERFORMANCE, MetricType.DEBUG
    2. Can set metricCollector. Just has to extend AbstractMetricCollector()

The new conf would look like so

    http {
        maxTotalConnections=100
        maxConnectionsPerHost=10
    }
    driver {
        native {
            enableMetrics=PERFORMANCE # can be OFF, PERFORMANCE, or DEBUG
            setMetricCollector="net.spy.memcached.metrics.DefaultMetricCollector" # must extend AbstractMetricCollector
        }

Changes should be pretty straightfoward. Had to change some test cases because of compile issues, should be logically the same though.

Changes to the Build.scala are to pull in com.codahale.metrics. They are an optional dependency of couchbase-client but they are needed if user provides any of the metric data above.

zbintliff commented 9 years ago

For more information regarding Metrics you can see the blog when it was first introduce: http://blog.couchbase.com/whats-new-couchbase-java-sdk-12