Packages

class MaxNumberSource extends NumberSource

A NumberSource is considered a master "pool" of numbers from which all numbers are available to be drawn. Produce a series of numbers from 0 to a maximum number (inclusive) to be used as globally unique identifiers (GUID's).

Source
MaxNumberSource.scala
Exceptions thrown

IllegalArgumentException if max is less than zero (therefore the count of generated numbers is at most zero)

Linear Supertypes
NumberSource, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MaxNumberSource
  2. NumberSource
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new MaxNumberSource(max: Int)

    max

    the highest number to be generated by this source; must be a positive integer or zero

    Exceptions thrown

    IllegalArgumentException if max is less than zero (therefore the count of generated numbers is at most zero)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clear(): List[IdentifiableEntity]

    Reset all number Monitors so that their underlying number is not longer treated as assigned.

    Reset all number Monitors so that their underlying number is not longer treated as assigned. Perform some level of housecleaning to ensure that all dependencies are resolved in some manner.

    returns

    a List of assignments maintained by all the currently-used number Monitors

    Definition Classes
    MaxNumberSourceNumberSource
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def count(policy: AvailabilityPolicy): Int

    Select the type of count desired based on the allocation policy of the key.

    Select the type of count desired based on the allocation policy of the key.

    policy

    the allocation policy

    returns

    the number of keys belonging to this policy

    Definition Classes
    NumberSource
  8. def countAvailable: Int

    The count of numbers that can still be drawn.

    The count of numbers that can still be drawn.

    returns

    the count

    Definition Classes
    MaxNumberSourceNumberSource
  9. def countDangling: Int

    The count of numbers that can not be drawn but have not yet been assigned to an entity.

    The count of numbers that can not be drawn but have not yet been assigned to an entity. Could only ever be a non-zero count if the number of used keys is a non-zero count.

    returns

    the count

    Definition Classes
    MaxNumberSourceNumberSource
  10. def countUsed: Int

    The count of numbers that can not be drawn.

    The count of numbers that can not be drawn.

    returns

    the count

    Definition Classes
    MaxNumberSourceNumberSource
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. def get(obj: IdentifiableEntity): Option[SecureKey]

    Produce an un-modifiable wrapper for the Monitor for this entity, if the entity is discovered being represented in this source.

    Produce an un-modifiable wrapper for the Monitor for this entity, if the entity is discovered being represented in this source.

    obj

    the entity

    returns

    the wrapped Monitor

    Definition Classes
    MaxNumberSourceNumberSource
  15. def get(number: Int): Option[SecureKey]

    Produce an un-modifiable wrapper for the Monitor for this number.

    Produce an un-modifiable wrapper for the Monitor for this number.

    number

    the number

    returns

    the wrapped Monitor

    Definition Classes
    MaxNumberSourceNumberSource
  16. def getAvailable(number: Int): Option[LoanedKey]

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used.

    Produce a modifiable wrapper for the Monitor for this number, only if the number has not been used. The Monitor should be updated before being wrapped, if necessary.

    number

    the number

    returns

    the wrapped Monitor, or None

    Definition Classes
    MaxNumberSourceNumberSource
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. val max: Int

    The maximum number that can be produced by this source.

    The maximum number that can be produced by this source.

    returns

    the max

    Definition Classes
    MaxNumberSourceNumberSource
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def returnNumber(number: Int): Option[IdentifiableEntity]

    Consume the number of a Monitor and release that number from its previous assignment/use.

    Consume the number of a Monitor and release that number from its previous assignment/use.

    number

    the number

    returns

    any object previously using this number

    Definition Classes
    MaxNumberSourceNumberSource
  25. def returnNumber(monitor: LoanedKey): Option[IdentifiableEntity]

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    monitor

    the Monitor

    returns

    any object previously using this Monitor

    Definition Classes
    NumberSource
  26. def returnNumber(monitor: SecureKey): Option[IdentifiableEntity]

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    Consume a wrapped Monitor and release its number from its previous assignment/use.

    monitor

    the Monitor

    returns

    any object previously using this Monitor

    Definition Classes
    NumberSource
  27. def size: Int

    The count of numbers allocated to this source.

    The count of numbers allocated to this source.

    returns

    the count

    Definition Classes
    MaxNumberSourceNumberSource
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def test(number: Int): Boolean

    Is this number a member of this number source?

    Is this number a member of this number source?

    number

    the number

    returns

    true, if it is a member; false, otherwise

    Definition Classes
    MaxNumberSourceNumberSource
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from NumberSource

Inherited from AnyRef

Inherited from Any

Ungrouped