com.gilt.gfc.cache

DerivedSyncCacheImpl

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
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

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

    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)]

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

    Definition Classes
    DerivedSyncCacheImplSyncCache
  8. def checkStarted(): Unit

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

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

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

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

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

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

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

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

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

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

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

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

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

    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
  22. final def getClass(): Class[_]

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

    Definition Classes
    SyncCache
  24. def hashCode(): Int

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

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

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

    Definition Classes
    Any
  28. def isStarted: Boolean

    Test if the cache has been started.

    Test if the cache has been started.

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

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

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

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

    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
  33. def onCacheReload(fromCache: Iterable[(K, V)]): Unit

    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
  34. def register(): DerivedSyncCacheImpl.this.type

    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

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

    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
  36. def replaceCache(objects: Iterable[(L, W)]): Unit

    Attributes
    protected
  37. def shutdown(): Unit

    Stop the cache from loading.

    Stop the cache from loading.

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

    Starts the loading of the cache.

    Starts the loading of the cache.

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

    Definition Classes
    AnyRef
  40. def toString(): String

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

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

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

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

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

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

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

    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