diff --git a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/CacheType.java b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/CacheType.java index 3bb341e45d..a96e7895c5 100644 --- a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/CacheType.java +++ b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/CacheType.java @@ -133,7 +133,7 @@ public enum CacheType { }, LinkedHashMap_Lru { @Override public BasicCache create(int maximumSize) { - return new LinkedHashMapCache<>(true, maximumSize); + return new LinkedHashMapCache<>(maximumSize, /* accessOrder */ true); } }, Rapidoid { diff --git a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/LinkedHashMapCache.java b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/LinkedHashMapCache.java index 36b557f211..3218cc6389 100644 --- a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/LinkedHashMapCache.java +++ b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/LinkedHashMapCache.java @@ -28,8 +28,8 @@ public final class LinkedHashMapCache implements BasicCache { private final Map map; - public LinkedHashMapCache(boolean accessOrder, int maximumSize) { - map = new BoundedLinkedHashMap<>(accessOrder, maximumSize); + public LinkedHashMapCache(int maximumSize, boolean accessOrder) { + map = new BoundedLinkedHashMap<>(maximumSize, accessOrder); } @Override @@ -58,7 +58,7 @@ static final class BoundedLinkedHashMap extends LinkedHashMap { private static final long serialVersionUID = 1L; private final int maximumSize; - public BoundedLinkedHashMap(boolean accessOrder, int maximumSize) { + public BoundedLinkedHashMap(int maximumSize, boolean accessOrder) { super(maximumSize, 0.75f, accessOrder); this.maximumSize = maximumSize; } diff --git a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/TCache.java b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/TCache.java index 838245351d..d6ba1358d8 100644 --- a/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/TCache.java +++ b/caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl/TCache.java @@ -15,8 +15,9 @@ */ package com.github.benmanes.caffeine.cache.impl; +import static com.github.benmanes.caffeine.cache.CacheType.CONCURRENCY_LEVEL; + import com.github.benmanes.caffeine.cache.BasicCache; -import com.github.benmanes.caffeine.cache.CacheType; import com.trivago.triava.tcache.Cache; import com.trivago.triava.tcache.EvictionPolicy; import com.trivago.triava.tcache.TCacheFactory; @@ -29,9 +30,10 @@ public final class TCache implements BasicCache { public TCache(int maximumSize, EvictionPolicy policy) { cache = TCacheFactory.standardFactory().builder() - .setConcurrencyLevel(CacheType.CONCURRENCY_LEVEL) + .setConcurrencyLevel(CONCURRENCY_LEVEL) .setMaxElements(maximumSize) .setEvictionPolicy(policy) + .setStatistics(false) .build(); } diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 1d30dbdaad..a866549fd5 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -64,7 +64,7 @@ ext { expiringMap: '0.5.8', jackrabbit: '1.7.7', jamm: '0.3.2', - javaObjectLayout: '0.8', + javaObjectLayout: '0.9', jmh: 1.19, koloboke: '0.6.8', ohc: '0.6.1', diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 8be97ec86a..71f07b540e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-rc-2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-bin.zip