trait SharedCacheManager extends NetworkObject[SharedCacheManagerReference]
This class is the main point of the shared cache feature. It handles cache content synchronisation and cache registration between the engines of a network. For example, you can synchronise a list between engine A and engine B, in which each modification will be send to the other engine in order to have the same list with the same items in the same orders.
- Alphabetic
- By Inheritance
- SharedCacheManager
- NetworkObject
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def attachToCache[A <: SharedCache](cacheID: Int, factory: SharedCacheFactory[A], behavior: CacheSearchMethod = CacheSearchMethod.GET_OR_OPEN)(implicit arg0: ClassTag[A]): A
- abstract val family: String
Each Cache manager have a family string, it's in fact the identifier of the cache manager.
Each Cache manager have a family string, it's in fact the identifier of the cache manager. For example, in the Network, each fr.linkit.api.gnom.network.Engine have a SharedCacheManager instance where the family string value is equals to the engine's identifier.
- abstract def getCacheInStore[A <: SharedCache](cacheID: Int)(implicit arg0: ClassTag[A]): A
Get cache that is already opened and registered in the local cache.
Get cache that is already opened and registered in the local cache. The cache content will not be retrieved, but if no cache is found in the local cache, this cache manager will not try to retrieve it on the network.
- cacheID
the cache identifier
- returns
the cache instance.
- Exceptions thrown
NoSuchCacheException
if no cache was found locally.
- abstract def getCacheTrafficNode(cacheID: Int): TrafficNode[TrafficObject[TrafficReference]]
- abstract def getCachesLinker: InitialisableNetworkObjectLinker[SharedCacheReference] with TrafficInterestedNPH
- abstract val network: Network
The network that hosts this cache
- abstract def reference: SharedCacheManagerReference
The reference of this Network Object.
The reference of this Network Object.
- Definition Classes
- NetworkObject
- See also
NetworkObjectReference
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def attachToCache[A <: SharedCache](cacheID: Int, behavior: CacheSearchMethod)(implicit arg0: ClassTag[A], factory: SharedCacheFactory[A]): A
Retrieves a SharedCache hosted by this SharedCacheManager.
Retrieves a SharedCache hosted by this SharedCacheManager.
This method will create and synchronise the current content of the cache that is placed on the cacheID :
If no cache is opened on the cacheID, it will simply be created and have an empty content.
If the cache was already opened by another engine, the cache instance will be created and its content will be synchronised.
The cache will then be stored locally if it was not present in it.
If the cache was already created and registered locally, the factory will not be called and the cached instance will then be returned.
Note: can't be sure that every cache instances with the same cacheID are of the same type.
- cacheID
the cache identifier
- behavior
the kind of behavior to adopt when creating a cache
- factory
the factory that will create the cache instance
- returns
the cache instance.
- Exceptions thrown
CacheNotAcceptedException
if the cache is already created but the cache's does not equals to the given one.- See also
- def attachToCache[A <: SharedCache](cacheID: Int)(implicit arg0: ClassTag[A], factory: SharedCacheFactory[A]): A
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated