Trait

com.gilt.gfc.cache

DerivedSyncCacheImpl

Related Doc: package cache

Permalink

trait DerivedSyncCacheImpl[K, V, L, W] extends SyncCache[L, W] with SyncCacheEventNotifierImpl[L, W] with SyncCacheEventHandler[K, V] with DerivedCacheBaseImpl

This trait provides a sync cache implementation with ability to register SyncCacheEventHandlers which will be notified when the cache content is reloaded. Content of this cache is loaded from a parent SyncCache and it is reloaded on parent cache reload.

K

- key type of the parent cache

V

- value type of the parent cache

L

- key type of this cache

W

- value type of this cache

Linear Supertypes
DerivedCacheBaseImpl, Loggable, SyncCacheEventHandler[K, V], SyncCacheEventNotifierImpl[L, W], SyncCache[L, W], SyncCacheEventNotifier[L, W], CacheBase, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DerivedSyncCacheImpl
  2. DerivedCacheBaseImpl
  3. Loggable
  4. SyncCacheEventHandler
  5. SyncCacheEventNotifierImpl
  6. SyncCache
  7. SyncCacheEventNotifier
  8. CacheBase
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def parent: SyncCache[K, V]

    Permalink

    The parent this cache is derived from.

    The parent this cache is derived from.

    Definition Classes
    DerivedSyncCacheImpl → DerivedCacheBaseImpl
  2. abstract def transformSourceObject(k: K, v: V): Iterable[(L, W)]

    Permalink

    This methods defines the process of transforming a key value pair from the parent cache into a iterable collection of key value pairs for the derived cache.

    This methods defines the process of transforming a key value pair from the parent cache into a iterable collection of key value pairs for the derived cache.

    k

    - key of the parent cache

    v

    - value of the parent cache

    returns

    - an iterable collection of derived key,value pairs

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[L, W]

    Permalink
    Definition Classes
    DerivedSyncCacheImplSyncCache
  6. def checkStarted(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    DerivedSyncCacheImpl → CacheBase
  7. def clone(): AnyRef

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

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

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. def get(key: L): Option[W]

    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.

    This will try to fetch the value from the in-memory cache with no remote call on cache-misses.

    key

    unique key of the needed value.

    returns

    an optional value if found, None otherwise.

    Definition Classes
    DerivedSyncCacheImplSyncCache
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def getOpt(key: L): Optional[W]

    Permalink
    Definition Classes
    SyncCache
  22. def hashCode(): Int

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

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

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

    Permalink
    Definition Classes
    Any
  26. def isStarted: Boolean

    Permalink

    Test if the cache has been started.

    Test if the cache has been started.

    Definition Classes
    DerivedCacheBaseImpl → CacheBase
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  30. def notifyCacheReloadFor(cache: Iterable[(L, W)]): Unit

    Permalink

    Notifies all registered SyncCacheEventHandler's that cache was reloaded.

    Notifies all registered SyncCacheEventHandler's that cache was reloaded.

    cache

    - cache that was reloaded

    Definition Classes
    SyncCacheEventNotifierImpl
  31. def onCacheReload(fromCache: Iterable[(K, V)]): Unit

    Permalink

    Reloads the content of this cache from the provided fromCache and notifies all registered SyncCacheEventHandlers for cache reload.

    Reloads the content of this cache from the provided fromCache and notifies all registered SyncCacheEventHandlers for cache reload.

    fromCache

    - the content of the parent cache that was reloaded

    Definition Classes
    DerivedSyncCacheImplSyncCacheEventHandler
  32. def register(): DerivedSyncCacheImpl.this.type

    Permalink

    Loads the content of this cache from its parent, if the parent is started.

    Loads the content of this cache from its parent, if the parent is started. Register itself for parent cache change notifications.

    This method should be called only once, when the cache is ready to receive notifications. Subsequent calls to this method are of no effect.

    returns

    this cache ready to receive notifications from its parent

  33. def registerHandler(handler: SyncCacheEventHandler[L, W]): Unit

    Permalink

    Register a SyncCacheEventHandler to be notified for cache events.

    Register a SyncCacheEventHandler to be notified for cache events.

    handler

    - the handler to be notified for cache events

    Definition Classes
    SyncCacheEventNotifierImplSyncCacheEventNotifier
  34. def replaceCache(objects: Iterable[(L, W)]): Unit

    Permalink
    Attributes
    protected
  35. def shutdown(): Unit

    Permalink

    Stop the cache from loading.

    Stop the cache from loading.

    Definition Classes
    DerivedCacheBaseImpl → CacheBase
  36. def start(): DerivedSyncCacheImpl.this.type

    Permalink

    Starts the loading of the cache.

    Starts the loading of the cache.

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

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

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

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Loggable

Inherited from DerivedCacheBaseImpl

Inherited from Loggable

Inherited from SyncCacheEventHandler[K, V]

Inherited from SyncCacheEventNotifierImpl[L, W]

Inherited from SyncCache[L, W]

Inherited from SyncCacheEventNotifier[L, W]

Inherited from CacheBase

Inherited from AnyRef

Inherited from Any

Ungrouped