Package me.saro.kit

Class CacheStore<ID,​T>

java.lang.Object
me.saro.kit.CacheStore<ID,​T>
Type Parameters:
T -
ID -

public class CacheStore<ID,​T>
extends java.lang.Object
Author:
PARK Yong Seo
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  CacheStore.CacheWrapper<T>  
  • Constructor Summary

    Constructors 
    Constructor Description
    CacheStore​(long cacheTimeMillis)  
  • Method Summary

    Modifier and Type Method Description
    void clear()
    clear
    T get​(ID id, java.util.function.Function<ID,​T> orElse)
    get
    T getAfterForcedUpdate​(ID id, T value)
    get after forced update
    void remove​(ID id)
    remove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CacheStore

      public CacheStore​(long cacheTimeMillis)
  • Method Details

    • get

      public T get​(ID id, java.util.function.Function<ID,​T> orElse)
      get
      Parameters:
      id - id
      orElse - or else value
      Returns:
    • getAfterForcedUpdate

      public T getAfterForcedUpdate​(ID id, T value)
      get after forced update
      Parameters:
      id - id
      value - update value
      Returns:
    • remove

      public void remove​(ID id)
      remove
      Parameters:
      id - id
    • clear

      public void clear()
      clear