com.gilt.gfc.cache

AsyncCache

trait AsyncCache[K, V] extends CacheBase with AsyncCacheEventNotifier[K, V]

Trait that describes an asynchronous cache. AsyncCache is expected to be incomplete in memory and thus return value as Future[Option[V]] indicating that the value may need to be lazy-loaded by issuing a remote call.

Since

28/Jul/2014 15:58

Linear Supertypes
AsyncCacheEventNotifier[K, V], CacheBase, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AsyncCache
  2. AsyncCacheEventNotifier
  3. CacheBase
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def asMap: Map[K, Future[Option[V]]]

    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.

    returns

  2. abstract def flatPeek(key: K): Option[V]

    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.

    key
    returns

  3. abstract def get(key: K): Future[Option[V]]

    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.

  4. abstract def isStarted: Boolean

    Test if the cache has been started.

    Test if the cache has been started.

    Definition Classes
    CacheBase
  5. abstract def peek(key: K): Option[Future[Option[V]]]

    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.

    key
    returns

  6. abstract def registerHandler(handler: AsyncCacheEventHandler[K, V]): Unit

    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
    AsyncCacheEventNotifier
  7. abstract def shutdown(): Unit

    Stop the cache from loading.

    Stop the cache from loading.

    Definition Classes
    CacheBase
  8. abstract def start(): AsyncCache.this.type

    Starts the loading of the cache.

    Starts the loading of the cache.

    Definition Classes
    CacheBase

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def checkStarted(): Unit

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def jGet(key: K): ListenableFuture[Optional[V]]

  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AsyncCacheEventNotifier[K, V]

Inherited from CacheBase

Inherited from AnyRef

Inherited from Any

Ungrouped