Skip to content

Referencing

Äkwav edited this page Apr 13, 2019 · 1 revision

As Referenceables don't have to be present on the current server we need a way to reference them. This is done by a Reference<T> which links the SourceReference identifying the Object to the Object which it is referencing. Basiacally it glues together objects on different servers.

Execute A command for List<Reference<T>>

To execute a Command for a list of Referenced Resources you would type

var list = new List<Reference<CoflnetUser>>()
foreach(var item in list)
{
    item.ExecuteForResource(new MessageData("msg","hi");
}

This will call the Referencemanager which has a list of all local Referenceables inside of a InnerReference object. For nonwriting commands it trys to

  1. Find the InnerReference that may have addidional information (such as a mirror server/sibbling managing node) and executes if found
  2. Tries to find General mappings between servers (complete sibbling nodes)
  3. Takes the server from the SourceReference and executes the command there.

For writing commands the managing node is always prefered.

Clone this wiki locally