Author: tomekr
Date: Fri Oct 21 11:24:05 2016
New Revision: 1765996
URL: http://svn.apache.org/viewvc?rev=1765996&view=rev
Log:
OAK-4674: Log a message when asynchronous persistent cache is enabled
Modified:
jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/NodeCache.java
Modified:
jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/NodeCache.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/NodeCache.java?rev=1765996&r1=1765995&r2=1765996&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/NodeCache.java
(original)
+++
jackrabbit/oak/branches/1.4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/NodeCache.java
Fri Oct 21 11:24:05 2016
@@ -47,9 +47,13 @@ import com.google.common.cache.CacheStat
import com.google.common.cache.RemovalCause;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
class NodeCache<K, V> implements Cache<K, V>, GenerationCache,
EvictionListener<K, V> {
+ static final Logger LOG = LoggerFactory.getLogger(NodeCache.class);
+
private static final Set<RemovalCause> EVICTION_CAUSES =
ImmutableSet.of(COLLECTED, EXPIRED, SIZE);
/**
@@ -84,8 +88,10 @@ class NodeCache<K, V> implements Cache<K
valueType = new ValueDataType(docNodeStore, docStore, type);
if (ASYNC_CACHE) {
this.writerQueue = new CacheWriteQueue<K, V>(dispatcher, cache,
map);
+ LOG.info("The persistent cache writes will be asynchronous");
} else {
this.writerQueue = null;
+ LOG.info("The persistent cache writes will be synchronous");
}
this.stats = new PersistentCacheStats(type, statisticsProvider);
}