Trait

com.gilt.gfc.cache

AsyncCacheImpl

Related Doc: package cache

Permalink

trait AsyncCacheImpl[K, V] extends AsyncCache[K, V] with AsyncCacheEventNotifierImpl[K, V] with CacheBaseImpl[K, V]

AsyncCache Implementation that in addition to a build-load function requires a load function to be implemented that is called on cache-miss.

Self Type
AsyncCacheImpl[K, V] with CacheConfiguration
Since

28/Jul/2014 15:58

Linear Supertypes
CacheBaseImpl[K, V], Loggable, AsyncCacheEventNotifierImpl[K, V], AsyncCache[K, V], AsyncCacheEventNotifier[K, V], CacheBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AsyncCacheImpl
  2. CacheBaseImpl
  3. Loggable
  4. AsyncCacheEventNotifierImpl
  5. AsyncCache
  6. AsyncCacheEventNotifier
  7. CacheBase
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getSourceObject(key: K): Future[Option[V]]

    Permalink

    Called when there is a cache miss.

    Called when there is a cache miss.

    key

    - the key for the missing data

    returns

    the source data with the given key, or Optional.absent if it doesn't exist

  2. abstract def getSourceObjects: Future[Iterable[(K, V)]]

    Permalink

    The source data that will be used to build all views

    The source data that will be used to build all views

    returns

    an iterator of key-value pairs that will be used to build all cached views

    Definition Classes
    CacheBaseImpl

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asMap: Map[K, Future[Option[V]]]

    Permalink

    View this cache as an immutable Map.

    View this cache as an immutable Map. The returned Map is a snapshot of the cache, i.e. any changes to the cache, both incremental and bulk-reloads, are not reflected in the returned Map.

    Definition Classes
    AsyncCacheImplAsyncCache
  6. def buildCache(kvs: Iterable[(K, V)]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    AsyncCacheImpl → CacheBaseImpl
  7. def checkStarted(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    CacheBase
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def debug(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  10. def debug(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def error(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  14. def error(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  15. def error(ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  16. def executor: AsyncScheduledExecutorService

    Permalink
    Attributes
    protected
    Definition Classes
    CacheBaseImpl
  17. def fatal(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  18. def fatal(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  19. def fatal(ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  20. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def flatPeek(key: K): Option[V]

    Permalink

    Peek if the given key is cached, resolved and present or not.

    Peek if the given key is cached, resolved and present or not. If it is, it returns a Some of the value, otherwise None. This works by flattening down the return value of peek. This method does not trigger a remote call if the given key is not cached already.

    Definition Classes
    AsyncCacheImplAsyncCache
  22. def get(key: K): Future[Option[V]]

    Permalink

    Try to load a value from the cache with the given key.

    Try to load a value from the cache with the given key. A cache miss may cause a remote call to look for the value, depending on the cache implementation.

    Definition Classes
    AsyncCacheImplAsyncCache
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  25. def info(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  26. def info(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def isStarted: Boolean

    Permalink

    Test if the cache has been started.

    Test if the cache has been started.

    Definition Classes
    CacheBaseImpl → CacheBase
  29. final def jGet(key: K): ListenableFuture[Optional[V]]

    Permalink
    Definition Classes
    AsyncCache
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def notifyCacheMissFor(key: K, value: V): Unit

    Permalink

    Notifies all registered AsyncCacheEventHandler's for a cache miss for the provided key.

    Notifies all registered AsyncCacheEventHandler's for a cache miss for the provided key.

    key

    - cache key

    value

    - cache value

    Definition Classes
    AsyncCacheEventNotifierImpl
  34. def notifyCacheReloadFor(cache: Iterable[(K, V)]): Unit

    Permalink

    Notifies all registered AsyncCacheEventHandler's that provided cache was reloaded.

    Notifies all registered AsyncCacheEventHandler's that provided cache was reloaded.

    cache

    - cache that was reloaded

    Definition Classes
    AsyncCacheEventNotifierImpl
  35. def peek(key: K): Option[Future[Option[V]]]

    Permalink

    Peek if the given key is already cached or not.

    Peek if the given key is already cached or not. If it is, it returns a Some of cached Future, otherwise None. This method does not trigger a remote call if the given key is not cached already.

    Definition Classes
    AsyncCacheImplAsyncCache
  36. def put(key: K, value: Future[Option[V]]): Unit

    Permalink
    Attributes
    protected
  37. def registerHandler(handler: AsyncCacheEventHandler[K, V]): Unit

    Permalink

    Register an AsyncCacheEventHandler to be notified for cache events.

    Register an AsyncCacheEventHandler to be notified for cache events.

    handler

    - the handler to be notified for cache events

    Definition Classes
    AsyncCacheEventNotifierImplAsyncCacheEventNotifier
  38. def reload(): Future[Unit]

    Permalink
    Definition Classes
    CacheBaseImpl
  39. def shutdown(): Unit

    Permalink

    Stop the cache from loading.

    Stop the cache from loading.

    Definition Classes
    CacheBaseImpl → CacheBase
  40. def start(): AsyncCacheImpl.this

    Permalink

    Starts the loading of the cache.

    Starts the loading of the cache.

    Definition Classes
    CacheBaseImpl → CacheBase
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  43. def trace(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  44. def trace(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  45. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def warn(message: ⇒ String, ex: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable
  49. def warn(message: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable

Inherited from CacheBaseImpl[K, V]

Inherited from Loggable

Inherited from AsyncCacheEventNotifierImpl[K, V]

Inherited from AsyncCache[K, V]

Inherited from AsyncCacheEventNotifier[K, V]

Inherited from CacheBase

Inherited from AnyRef

Inherited from Any

Ungrouped