case class MessageID(value: Long) extends ID[Long] with Ordered[MessageID] with Product with Serializable
Class to represent the identifier of a message. Although it is unlikely (though not forbidden) that an application programmer will rely directly on message identifiers, it is not entirely transparent since they must be generated properly when creating new messages.
To make matters simple and to avoid obscuring the code of protocols, it is very strongly
recommended to enforce auto-incrementation when declaring new messages. This is done by having
the id
field declared last and assigned with a default value obtained through the class method
MessageID#autoIncrement, as illustrated below:
case class Token( from: PID, to: PID, id: MessageID = MessageID.autoIncrement() ) extends UnicastMessage(from, to, id)
- value
the raw value of the ID
- Alphabetic
- By Inheritance
- MessageID
- Serializable
- Serializable
- Product
- Equals
- Ordered
- Comparable
- ID
- AnyRef
- Any
- by orderingToOrdered
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (MessageID, B)
-
def
<(that: MessageID): Boolean
- Definition Classes
- Ordered
-
def
<=(that: MessageID): Boolean
- Definition Classes
- Ordered
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
>(that: MessageID): Boolean
- Definition Classes
- Ordered
-
def
>=(that: MessageID): Boolean
- Definition Classes
- Ordered
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
compare(that: MessageID): Int
- Definition Classes
- MessageID → Ordered
-
def
compareTo(that: MessageID): Int
- Definition Classes
- Ordered → Comparable
- def ensuring(cond: (MessageID) ⇒ Boolean, msg: ⇒ Any): MessageID
- def ensuring(cond: (MessageID) ⇒ Boolean): MessageID
- def ensuring(cond: Boolean, msg: ⇒ Any): MessageID
- def ensuring(cond: Boolean): MessageID
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
idWith(newID: Long): MessageID
Returns a new instance of the same type of identifier initialized with the value given as parameter.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map(f: (Long) ⇒ Long): SameType
Applies a function to the value of the identifier and returns a new identifier with the result.
Applies a function to the value of the identifier and returns a new identifier with the result.
- f
function to apply on the value
- returns
identifier with the result of applying
f()
- Definition Classes
- ID
-
def
map2[B <: Long](that: ID[B])(f: (Long, B) ⇒ Long): SameType
Applies a function combining the values of two identifiers and returns a new identifier with the result.
Applies a function combining the values of two identifiers and returns a new identifier with the result.
- B
type of value of the other identifier
- that
other identifier to combine
- f
function to apply on the values of the two identifiers
- returns
identifier with the result of applying
f()
- Definition Classes
- ID
-
def
name: String
Output-friendly string representation of the identifier.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
val
value: Long
Value encapsulated by the identifier.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (MessageID, B)
Shadowed Implicit Value Members
-
def
<(that: MessageID): Boolean
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).<(that)
- Definition Classes
- Ordered
-
def
<=(that: MessageID): Boolean
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).<=(that)
- Definition Classes
- Ordered
-
def
>(that: MessageID): Boolean
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).>(that)
- Definition Classes
- Ordered
-
def
>=(that: MessageID): Boolean
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).>=(that)
- Definition Classes
- Ordered
-
def
compare(that: MessageID): Int
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).compare(that)
- Definition Classes
- Ordered
-
def
compareTo(that: MessageID): Int
- Implicit
- This member is added by an implicit conversion from MessageID to Ordered[MessageID] performed by method orderingToOrdered in scala.math.Ordered.
- Shadowing
- This implicitly inherited member is shadowed by one or more members in this class.
To access this member you can use a type ascription:(messageID: Ordered[MessageID]).compareTo(that)
- Definition Classes
- Ordered → Comparable