class UniqueNumberOps extends AnyRef
Wrap around converted NumberPool
s and synchronize a portion of the number registration process
as a part of the global unique identifier (GUID, UID) number system (UNS, "unique number system").
The ultimate goal is to manage a coherent group of unique identifiers for a given "region".
Both parts of the UID system sit atop the Zone
for easy external access.
The plain part - the NumberPoolHub
here - is used for low-priority requests
such as checking for existing associations.
A four part process is used for object registration tasks.
First, the requested NumberPool
is located among the list of known NumberPool
s.
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 Actor
and the Map
of NumberPoolActors
is as a "gate."
A single Map
is constructed and shared between multiple entry points to the UID system where requests are messaged.
Multiple entry points send messages to the same NumberPool
.
That NumberPool
deals 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 the NumberPool
selecting a number.
(At least, both should be fast.)
- Source
- UniqueNumberOps.scala
- Alphabetic
- By Inheritance
- UniqueNumberOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new UniqueNumberOps(guid: NumberPoolHub, poolActors: Map[String, ActorRef])
- guid
the supporting datatype for the unique number distribution
- poolActors
a mapping created from the
NumberPool
s, to achieve synchronized access
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
- def Register(obj: IdentifiableEntity, poolName: String): Future[Any]
The entry point for the entity GUID registration process.
The entry point for the entity GUID registration process. A special check is made first to determine if the entity is already registered, and if so to where. If the entity is not registered, then the process continues.
- obj
the entity to be assigned a GUID
- poolName
the pool from which the entity wants a GUID to be selected
- returns
the anticipation of this activity being completed
- def Unregister(obj: IdentifiableEntity): Future[Any]
The entry point for the entity GUID unregistration process.
The entry point for the entity GUID unregistration process. A special check is made first to determine where, if at all, the entity is registered. Obviously, if the entity is not registered somewhere within purview of this UNS, the process can not continue. If the entity's registration number pool is found, then the process continues.
- obj
the entity to be unassigned its GUID
- returns
the anticipation of this activity being completed
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- 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()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def registrationProcessRetry(promise: Promise[Any], exception: Throwable, obj: IdentifiableEntity, hub: NumberPoolHub, pools: Map[String, ActorRef], poolName: String): Unit
na
na
- promise
the ongoing promise to be fulfilled for the future
- exception
an issue that has arrisen, forcing the retry attempt
- obj
the entity to be assigned a GUID
- hub
the supporting datatype for the unique number distribution
- pools
a mapping created from the
NumberPool
s, to achieve synchronized access- poolName
the pool to which the object is trying to register
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()