Skip to content

Commit 0238156

Browse files
committed
Reorder these declarations for consistency
so that all three of these caches have relativeNanoTimeProvider, then hitsTimeInNanos, then missesTimeInNanos.
1 parent 84c67c8 commit 0238156

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public String toString() {
4242
}
4343
};
4444

45-
private final LongSupplier relativeNanoTimeProvider;
4645
private final Cache<CacheKey, Object> cache;
46+
private final LongSupplier relativeNanoTimeProvider;
4747
private final LongAdder hitsTimeInNanos = new LongAdder();
4848
private final LongAdder missesTimeInNanos = new LongAdder();
4949

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/accesscontrol/DocumentSubsetBitsetCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ public final class DocumentSubsetBitsetCache implements IndexReader.ClosedListen
125125
private final Cache<BitsetCacheKey, BitSet> bitsetCache;
126126
private final Map<IndexReader.CacheKey, Set<BitsetCacheKey>> keysByIndex;
127127
private final AtomicLong cacheFullWarningTime;
128+
private final LongSupplier relativeNanoTimeProvider;
128129
private final LongAdder hitsTimeInNanos = new LongAdder();
129130
private final LongAdder missesTimeInNanos = new LongAdder();
130-
private final LongSupplier relativeNanoTimeProvider;
131131

132132
public DocumentSubsetBitsetCache(Settings settings, ThreadPool threadPool) {
133133
this(settings, threadPool.executor(ThreadPool.Names.GENERIC));

x-pack/plugin/enrich/src/main/java/org/elasticsearch/xpack/enrich/EnrichCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public final class EnrichCache {
4646
private static final CacheValue EMPTY_CACHE_VALUE = new CacheValue(List.of(), CacheKey.CACHE_KEY_SIZE);
4747

4848
private final Cache<CacheKey, CacheValue> cache;
49+
private final LongAdder sizeInBytes = new LongAdder();
4950
private final LongSupplier relativeNanoTimeProvider;
5051
private final LongAdder hitsTimeInNanos = new LongAdder();
5152
private final LongAdder missesTimeInNanos = new LongAdder();
52-
private final LongAdder sizeInBytes = new LongAdder();
5353

5454
EnrichCache(long maxSize) {
5555
this(maxSize, System::nanoTime);

0 commit comments

Comments
 (0)