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.
- Alphabetic
- By Inheritance
- ConnectedObjectCache
- PacketAttributesPresence
- SharedCache
- DynamicNetworkObject
- NetworkObject
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def addDefaultAttribute(key: Serializable, value: Serializable): ConnectedObjectCache.this.type
- Definition Classes
- PacketAttributesPresence
- abstract val cacheID: Int
The cache ID of this cache.
The cache ID of this cache.
- Definition Classes
- SharedCache
- 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.
- abstract def drainAllAttributes(packetAttributes: PacketAttributes): ConnectedObjectCache.this.type
- Definition Classes
- PacketAttributesPresence
- abstract def drainAllDefaultAttributes(packetAttributes: PacketAttributesPresence): ConnectedObjectCache.this.type
- Definition Classes
- PacketAttributesPresence
- abstract val family: String
The SharedCacheManager family that manages this cache.
The SharedCacheManager family that manages this cache.
- Definition Classes
- SharedCache
- 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.
- 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
- abstract def getDefaultAttribute[S](key: Serializable): Option[S]
- Definition Classes
- PacketAttributesPresence
- 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.
- abstract def mirrorObject(id: Int, creator: SyncInstanceCreator[_ <: A], contracts: ContractDescriptorData): A with SynchronizedObject[A]
- abstract val network: Network
- abstract val ownerID: String
- Definition Classes
- SharedCache
- abstract def presence: NetworkObjectPresence
- Definition Classes
- DynamicNetworkObject
- abstract def reference: SharedCacheReference
The reference of this Network Object.
The reference of this Network Object.
- Definition Classes
- NetworkObject
- See also
NetworkObjectReference
- 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
- 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 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 getOrSynchronize(id: Int)(or: => SyncInstanceCreator[_ <: A]): A with SynchronizedObject[A]
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mirrorObject(id: Int, creator: SyncInstanceCreator[_ <: A]): A with SynchronizedObject[A]
- 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()
- 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)
- 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