Interface Cache

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
CaffeineCache, HybridCache, MapCache, MemcachedCache

public interface Cache extends Closeable
  • Method Details

    • get

      @Nullable byte[] get(Cache.NamedKey key)
    • put

      void put(Cache.NamedKey key, byte[] value)
    • getBulk

      Map<Cache.NamedKey,byte[]> getBulk(Iterable<Cache.NamedKey> keys)
      Resulting map should not contain any null values (i.e. cache misses should not be included)
      Parameters:
      keys -
      Returns:
    • close

      void close(String namespace)
    • getStats

      CacheStats getStats()
    • isLocal

      boolean isLocal()
    • doMonitor

      void doMonitor(ServiceEmitter emitter)
      Custom metrics not covered by CacheStats may be emitted by this method.
      Parameters:
      emitter - The service emitter to emit on.