Class TickBasedCache<K,V>
java.lang.Object
com.simibubi.create.foundation.utility.TickBasedCache<K,V>
- All Implemented Interfaces:
com.google.common.cache.Cache<K,V>
-
Constructor Summary
ConstructorsConstructorDescriptionTickBasedCache(int ticksUntilTimeout, boolean resetTimerOnAccess) TickBasedCache(int ticksUntilTimeout, boolean resetTimerOnAccess, boolean clientSide) -
Method Summary
Modifier and TypeMethodDescriptionasMap()voidcleanUp()static voidgetAllPresent(Iterable<? extends Object> keys) getIfPresent(Object key) voidinvalidate(Object key) voidvoidinvalidateAll(Iterable<? extends Object> keys) voidvoidlongsize()com.google.common.cache.CacheStatsstats()static voidtick()intticks()
-
Constructor Details
-
TickBasedCache
public TickBasedCache(int ticksUntilTimeout, boolean resetTimerOnAccess) -
TickBasedCache
public TickBasedCache(int ticksUntilTimeout, boolean resetTimerOnAccess, boolean clientSide)
-
-
Method Details
-
tick
public static void tick() -
clientTick
public static void clientTick() -
getIfPresent
-
ticks
public int ticks() -
get
- Specified by:
getin interfacecom.google.common.cache.Cache<K,V> - Throws:
ExecutionException
-
getAllPresent
-
put
-
putAll
-
invalidate
-
invalidateAll
-
invalidateAll
public void invalidateAll() -
size
public long size() -
stats
public com.google.common.cache.CacheStats stats() -
asMap
-
cleanUp
public void cleanUp()
-