net.psforever.objects.guid.actor
the NumberPoolHub that is partially manipulated by this Actor
a common mapping created from the NumberPools in guid;
there is currently no check for this condition save for requests failing
An
Actorthat wraps around convertedNumberPools and synchronizes a portion of the number registration process. The ultimate goal is to manage a coherent group of unique identifiers for a given "region" (Zone). Both parts of the UID system sit atop theZonefor easy external access. The plain part - theNumberPoolHubhere - is used for low-priority requests such as checking for existing associations. ThisActoris the involved portion that paces registration and unregistration.A four part process is used for object registration tasks. First, the requested
NumberPoolis located among the list of knownNumberPools. Second, an asynchronous request is sent to that pool to retrieve a number. (Only any number. Only a failing case allows for selection of a specific number.) Third, the asynchronous request returns and the original information about the request is recovered. Fourth, both sides of the contract are completed by the object being assigned the number and the underlying "number source" is made to remember an association between the object and the number. Short circuits and recoveries as available on all steps though reporting is split between logging and callbacks. The process of removing the association between a number and object (unregistering) is a similar four part process.The important relationship between this
Actorand theMapofNumberPoolActorsis an "gate." A singleMapis constructed and shared between multiple entry points to the UID system where requests are messaged. Multiple entry points send messages to the sameNumberPool. ThatNumberPooldeals with the messages one at a time and sends reply to each entry point that communicated with it. This process is almost as fast as the process of theNumberPoolselecting a number. (At least, both should be fast.)