Package net.minecraft.data
Class HashCache.CacheUpdater
java.lang.Object
net.minecraft.data.HashCache.CacheUpdater
- All Implemented Interfaces:
CachedOutput
- Enclosing class:
HashCache
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate final HashCache.ProviderCacheBuilderprivate final HashCache.ProviderCacheprivate final Stringprivate final AtomicIntegerFields inherited from interface net.minecraft.data.CachedOutput
NO_CACHE -
Constructor Summary
ConstructorsConstructorDescriptionCacheUpdater(String provider, String version, HashCache.ProviderCache oldCache) -
Method Summary
Modifier and TypeMethodDescriptionclose()private booleanshouldWrite(Path key, com.google.common.hash.HashCode value) voidwriteIfNeeded(Path filePath, byte[] data, com.google.common.hash.HashCode hashCode)
-
Field Details
-
provider
-
oldCache
-
newCache
-
writes
-
closed
private volatile boolean closed
-
-
Constructor Details
-
CacheUpdater
CacheUpdater(String provider, String version, HashCache.ProviderCache oldCache)
-
-
Method Details
-
shouldWrite
-
writeIfNeeded
public void writeIfNeeded(Path filePath, byte[] data, com.google.common.hash.HashCode hashCode) throws IOException - Specified by:
writeIfNeededin interfaceCachedOutput- Throws:
IOException
-
close
-