Class GuavaStore<K,O>

All Implemented Interfaces:
Store<K,O>

public class GuavaStore<K,O> extends AbstractStore<K,O>
Store data in a Guava cache. Add the guava dependency to use this store.
Since:
2.0.0
Author:
Jerome Leleu
  • Constructor Details

    • GuavaStore

      public GuavaStore()
    • GuavaStore

      public GuavaStore(int size, int timeout, TimeUnit timeUnit)
  • Method Details

    • internalInit

      protected void internalInit(boolean forceReinit)
      Description copied from class: InitializableObject
      Internal initialization of the object.
      Overrides:
      internalInit in class AbstractStore<K,O>
    • internalGet

      protected Optional<O> internalGet(K key)
      Specified by:
      internalGet in class AbstractStore<K,O>
    • internalSet

      protected void internalSet(K key, O value)
      Specified by:
      internalSet in class AbstractStore<K,O>
    • internalRemove

      protected void internalRemove(K key)
      Specified by:
      internalRemove in class AbstractStore<K,O>
    • getCache

      public com.google.common.cache.Cache<K,O> getCache()
    • getSize

      public int getSize()
    • setSize

      public void setSize(int size)
    • getTimeout

      public int getTimeout()
    • setTimeout

      public void setTimeout(int timeout)
    • getTimeUnit

      public TimeUnit getTimeUnit()
    • setTimeUnit

      public void setTimeUnit(TimeUnit timeUnit)
    • toString

      public String toString()
      Overrides:
      toString in class Object