You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:56:11 UTC
[sling-org-apache-sling-nosql-couchbase-resourceprovider] 16/28:
SLING-4381 instantiate metrics adapter only once
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to annotated tag org.apache.sling.nosql.couchbase-resourceprovider-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-nosql-couchbase-resourceprovider.git
commit bb2b71682c1eee9363d1da3168fed5b07fc53bf2
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jun 2 14:36:07 2015 +0000
SLING-4381 instantiate metrics adapter only once
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/contrib/nosql/couchbase-resourceprovider@1683118 13f79535-47bb-0310-9956-ffa450edef68
---
.../impl/CouchbaseNoSqlResourceProviderFactory.java | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
index ea61ed3..a567978 100644
--- a/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
+++ b/src/main/java/org/apache/sling/nosql/couchbase/resourceprovider/impl/CouchbaseNoSqlResourceProviderFactory.java
@@ -73,15 +73,16 @@ public final class CouchbaseNoSqlResourceProviderFactory extends AbstractNoSqlRe
@Activate
private void activate(ComponentContext componentContext, Map<String, Object> config) {
- String cacheKeyPrefix = PropertiesUtil
- .toString(config.get(CACHE_KEY_PREFIX_PROPERTY), CACHE_KEY_PREFIX_DEFAULT);
- noSqlAdapter = new CouchbaseNoSqlAdapter(couchbaseClient, cacheKeyPrefix);
+ String cacheKeyPrefix = PropertiesUtil.toString(config.get(CACHE_KEY_PREFIX_PROPERTY), CACHE_KEY_PREFIX_DEFAULT);
+ NoSqlAdapter couchbaseAdapter = new CouchbaseNoSqlAdapter(couchbaseClient, cacheKeyPrefix);
+
+ // enable call logging and metrics for {@link CouchbaseNoSqlAdapter}
+ noSqlAdapter = new MetricsNoSqlAdapterWrapper(couchbaseAdapter, LoggerFactory.getLogger(CouchbaseNoSqlAdapter.class));
}
@Override
protected NoSqlAdapter getNoSqlAdapter() {
- // enable call logging and metrics for {@link CouchbaseNoSqlAdapter}
- return new MetricsNoSqlAdapterWrapper(noSqlAdapter, LoggerFactory.getLogger(CouchbaseNoSqlAdapter.class));
+ return noSqlAdapter;
}
@Override
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.