Class LookupCache

java.lang.Object
com.google.common.util.concurrent.AbstractIdleService
org.graylog2.plugin.lookup.LookupCache
All Implemented Interfaces:
com.google.common.util.concurrent.Service
Direct Known Subclasses:
CaffeineLookupCache, NullCache

public abstract class LookupCache extends com.google.common.util.concurrent.AbstractIdleService
  • Constructor Details

  • Method Details

    • incrTotalCount

      @Deprecated public void incrTotalCount()
      Deprecated.
    • incrTotalCount

      public void incrTotalCount(long n)
    • incrHitCount

      @Deprecated public void incrHitCount()
      Deprecated.
    • incrHitCount

      public void incrHitCount(long n)
    • incrMissCount

      @Deprecated public void incrMissCount()
      Deprecated.
    • incrMissCount

      public void incrMissCount(long n)
    • lookupTimer

      public com.codahale.metrics.Timer.Context lookupTimer()
    • entryCount

      public long entryCount()
      Get the number of elements in this lookup cache.
      Returns:
      the number of elements in this lookup cache or -1L if the cache does not support counting entries
    • startUp

      protected void startUp() throws Exception
      Specified by:
      startUp in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      Exception
    • doStart

      protected abstract void doStart() throws Exception
      Throws:
      Exception
    • shutDown

      protected void shutDown() throws Exception
      Specified by:
      shutDown in class com.google.common.util.concurrent.AbstractIdleService
      Throws:
      Exception
    • doStop

      protected abstract void doStop() throws Exception
      Throws:
      Exception
    • clearError

      protected void clearError()
    • getError

      public Optional<Throwable> getError()
    • setError

      protected void setError(Throwable throwable)
    • id

      @Nullable public String id()
    • setId

      public void setId(String id)
    • get

      public abstract LookupResult get(LookupCacheKey key, Callable<LookupResult> loader)
    • getIfPresent

      public abstract LookupResult getIfPresent(LookupCacheKey key)
    • purge

      public abstract void purge()
    • purge

      public abstract void purge(LookupCacheKey purgeKey)
    • getConfig

      public LookupCacheConfiguration getConfig()
    • name

      public String name()