Packages

trait ConnectedObjectCache[A <: AnyRef] extends SharedCache with PacketAttributesPresence

The main class of the Synchronized object system.
This classes is used as a SharedCache (see fr.linkit.api.gnom.cache.SharedCacheManager for more about shared caches.
With this cache, you can post or retrieve an object of type A.
Once the object is posted in the cache, it's cloned then transformed to an object of type A with SynchronizedObject[A].
Then, The object is broadcasted to all engines that are attached to this cache. <bt> All method invocations performed on the transformed object will be synchronized, This means that an RMI may occur following the fr.linkit.api.gnom.cache.sync.contract.behavior.ConnectedStructureBehavior of the synchronized object.
Notes: - A Synchronized object of type A with SynchronizedObject[A] can also hold inner synchronized objects of AnyRef type. These inner objects can be fields, or method parameters or return values.

  • An object posted on the cache is called a "Root object", they must be of type [A] but, as said before, they can contains other objects of any type.
A

the type of root objects.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConnectedObjectCache
  2. PacketAttributesPresence
  3. SharedCache
  4. DynamicNetworkObject
  5. NetworkObject
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def addDefaultAttribute(key: Serializable, value: Serializable): ConnectedObjectCache.this.type
    Definition Classes
    PacketAttributesPresence
  2. abstract val cacheID: Int

    The cache ID of this cache.

    The cache ID of this cache.

    Definition Classes
    SharedCache
  3. abstract val defaultContracts: ContractDescriptorData

    The default behavior tree for an fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectTree.

    The default behavior tree for an fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectTree. "the behavior of a tree" is simply a set of fr.linkit.api.gnom.cache.sync.contract.behavior.SynchronizedStructureBehavior that will set the behavior of each objects of a tree.

  4. abstract def drainAllAttributes(packetAttributes: PacketAttributes): ConnectedObjectCache.this.type
    Definition Classes
    PacketAttributesPresence
  5. abstract def drainAllDefaultAttributes(packetAttributes: PacketAttributesPresence): ConnectedObjectCache.this.type
    Definition Classes
    PacketAttributesPresence
  6. abstract val family: String

    The SharedCacheManager family that manages this cache.

    The SharedCacheManager family that manages this cache.

    Definition Classes
    SharedCache
  7. abstract def findObject(id: Int): Option[A with SynchronizedObject[A]]

    Finds a synchronized object in the cache.

    Finds a synchronized object in the cache.

    id

    the id of the root object that must be retrieved.

    returns

    None if no object is posted on the given id, Some(A with SynchronizedObject[A]) instead.

  8. abstract val forest: SynchronizedObjectForest[A]

    Once an object A gets posted, it will create a fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectTree, in which the root node (fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectNode) will contains sub nodes for inner synchronized objects.

    Once an object A gets posted, it will create a fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectTree, in which the root node (fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectNode) will contains sub nodes for inner synchronized objects.
    The inner objects can be synchronized fields, synchronized method parameters and return values of the object.
    If a field, a parameter or whatever contains sub synchronized objects, other nodes will be set as their child. Here is an example :

    SyncNode[A] (id: 12, path: 12) :
              -> Field SyncNode[B] (id: 78, path: 12/78) :
                       -> Field SyncNode[BC]               (id: 7, path: 12/78/7)
                       -> Method Return Value SyncNode[BD] (id: 8, path: 12/78/8)
              -> Field SyncNode[C] (id: 8, path: 12/8)   :
                       -> Method Parameter SyncNode[CA] (id: 9, path: 12/8/9)
              -> Method Parameter SyncNode[E] (id: 9, path: 12/9)

    Each node contains an ID, the path is an array of ids from the root's id to the node id

    See also

    fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectNode

    fr.linkit.api.gnom.cache.sync.tree.ConnectedObjectTree

  9. abstract def getDefaultAttribute[S](key: Serializable): Option[S]
    Definition Classes
    PacketAttributesPresence
  10. abstract def isRegistered(id: NamedIdentifier): Boolean

    id

    the object's identifier.

    returns

    true if an object of the given id is posted in this cache.

  11. abstract def mirrorObject(id: Int, creator: SyncInstanceCreator[_ <: A], contracts: ContractDescriptorData): A with SynchronizedObject[A]
  12. abstract val network: Network
  13. abstract val ownerID: String
    Definition Classes
    SharedCache
  14. abstract def presence: NetworkObjectPresence
    Definition Classes
    DynamicNetworkObject
  15. abstract def reference: SharedCacheReference

    The reference of this Network Object.

    The reference of this Network Object.

    Definition Classes
    NetworkObject
    See also

    NetworkObjectReference

  16. abstract def syncObject(id: Int, creator: SyncInstanceCreator[_ <: A], contract: ContractDescriptorData): A with SynchronizedObject[A]

    id

    the identifier of the root object

    creator

    the creator that will create the synchronized object.

    returns

    the synchronized object.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def getOrSynchronize(id: Int)(or: => SyncInstanceCreator[_ <: A]): A with SynchronizedObject[A]
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def mirrorObject(id: Int, creator: SyncInstanceCreator[_ <: A]): A with SynchronizedObject[A]
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. def syncObject(id: Int, creator: SyncInstanceCreator[_ <: A]): A with SynchronizedObject[A]

    posts an object in the cache.

    posts an object in the cache. The behavior of the object and sub objects will depends on the defaultContracts

    id

    the identifier of the root object

    creator

    the creator that will create the synchronized object.

    returns

    the synchronized object.

    Exceptions thrown

    CannotConnectException If the given object is a synchronized object. (No matters if the object is handled by this cache or not)

  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from SharedCache

Inherited from AnyRef

Inherited from Any

Ungrouped