Class ConcurrentSizedTimeoutCache<K,V>

java.lang.Object
com.hypixel.hytale.server.worldgen.util.cache.ConcurrentSizedTimeoutCache<K,V>
All Implemented Interfaces:
Cache<K,V>

public class ConcurrentSizedTimeoutCache<K,V> extends Object implements Cache<K,V>
  • Field Details

  • Constructor Details

    • ConcurrentSizedTimeoutCache

      public ConcurrentSizedTimeoutCache(int capacity, int concurrencyLevel, long timeout, @Nonnull TimeUnit timeoutUnit, @Nonnull Function<K,K> computeKey, @Nonnull Function<K,V> computeValue, @Nullable BiConsumer<K,V> destroyer)
  • Method Details

    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface Cache<K,V>
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface Cache<K,V>
    • get

      @Nonnull public V get(K key)
      Specified by:
      get in interface Cache<K,V>
    • noopDestroy

      private static <K, V> void noopDestroy(K key, V value)