Package net.minecraft.data
Class HashCache.CacheUpdater
java.lang.Object
net.minecraft.data.HashCache.CacheUpdater
- All Implemented Interfaces:
CachedOutput
- Enclosing class:
- HashCache
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final HashCache.ProviderCacheBuilder
private final HashCache.ProviderCache
private final String
private final AtomicInteger
Fields inherited from interface net.minecraft.data.CachedOutput
NO_CACHE
-
Constructor Summary
ConstructorDescriptionCacheUpdater
(String p_253971_, String p_254002_, HashCache.ProviderCache p_254244_) -
Method Summary
Modifier and TypeMethodDescriptionclose()
private boolean
shouldWrite
(Path p_236120_, com.google.common.hash.HashCode p_236121_) void
writeIfNeeded
(Path p_236123_, byte[] p_236124_, com.google.common.hash.HashCode p_236125_)
-
Field Details
-
provider
-
oldCache
-
newCache
-
writes
-
closed
private volatile boolean closed
-
-
Constructor Details
-
CacheUpdater
CacheUpdater(String p_253971_, String p_254002_, HashCache.ProviderCache p_254244_)
-
-
Method Details
-
shouldWrite
-
writeIfNeeded
public void writeIfNeeded(Path p_236123_, byte[] p_236124_, com.google.common.hash.HashCode p_236125_) throws IOException - Specified by:
writeIfNeeded
in interfaceCachedOutput
- Throws:
IOException
-
close
-