Packages

class UniqueNumberOps extends AnyRef

Wrap around converted NumberPools 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 NumberPools. 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
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UniqueNumberOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new UniqueNumberOps(guid: NumberPoolHub, poolActors: Map[String, ActorRef])

    guid

    the supporting datatype for the unique number distribution

    poolActors

    a mapping created from the NumberPools, to achieve synchronized access

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. 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

  5. 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

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. 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 NumberPools, to achieve synchronized access

    poolName

    the pool to which the object is trying to register

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

Inherited from AnyRef

Inherited from Any

Ungrouped