cc.otavia.core.message

Members list

Type members

Classlikes

case class AcceptedEvent(channel: Channel, accepted: Channel) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
trait Ask[R <: Reply] extends Call

A Call that expects a reply of type R. When an actor receives an Ask, it must eventually call stack.return(reply) to deliver a R back to the sender.

A Call that expects a reply of type R. When an actor receives an Ask, it must eventually call stack.return(reply) to deliver a R back to the sender.

The match type ReplyOf extracts R from an Ask at compile time, enabling type-safe request-response patterns without manual casting:

case class GetUser(id: Long) extends Ask[User]
// ReplyOf[GetUser] resolves to User at compile time

Type parameters

R

the expected reply type

Attributes

Supertypes
trait Call
trait Message
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Bind
trait Connect
class HttpRequest[C, R]
trait Command[R]
class Auth
class Del
class Get
class HGetAll
class HSet
class Info
class Select
class Set
class ExecuteCursor[R]
trait PrepareQuery[T]
trait SimpleQuery[T]
Show all
case class AskTimeoutEvent(registerId: Long, askId: Long) extends TimerEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class TimerEvent
class Event
class Object
trait Matchable
class Any
Show all
case class BindReply(channel: Channel, firstActive: Boolean = ..., cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
sealed trait Call extends Message

A Message that triggers stack coroutine execution when received by an cc.otavia.core.actor.Actor.

A Message that triggers stack coroutine execution when received by an cc.otavia.core.actor.Actor.

On delivery, the runtime creates a cc.otavia.core.stack.Stack (AskStack, NoticeStack, or batch variant) and invokes the actor's corresponding resume method.

Attributes

Supertypes
trait Message
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait Ask[R]
class Bind
trait Connect
class HttpRequest[C, R]
trait Command[R]
class Auth
class Del
class Get
class HGetAll
class HSet
class Info
class Select
class Set
class ExecuteCursor[R]
trait PrepareQuery[T]
trait SimpleQuery[T]
trait Notice
class Args
class ArrayNotice[T]
class IntNotice
class SeqNotice[T]
class StringNotice
class ProbeStart
trait LogMsg
class Debug
class Error
class Fatal
class Info
class Trace
class Warn
class CursorEnd
class CursorRow[R]
Show all
case class ChannelClose(channel: Channel, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class ChannelTimeoutEvent(registerId: Long, channel: Channel) extends TimerEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class TimerEvent
class Event
class Object
trait Matchable
class Any
Show all
case class ConnectReply(channel: Channel, firstActive: Boolean = ..., cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class DeregisterReply(channel: Channel, firstInactive: Boolean = ..., isOpen: Boolean = ..., cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class DisconnectReply(channel: Channel, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
object EMPTY_EVENT extends ReactorEvent

Attributes

Supertypes
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Self type
object Envelope

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Envelope.type
sealed abstract class Event

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
final class ExceptionMessage(message: String | Null, cause: Throwable | Null) extends Exception, Reply

exception message

exception message

Value parameters

cause

exception detail

message

exception message

Attributes

Companion
object
Supertypes
trait Reply
trait Message
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
object Helper

Some notices classes that may be used frequently

Some notices classes that may be used frequently

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Helper.type
sealed trait Message extends Serializable

The base type of all data exchanged between actors. Every value sent to or received from an actor must be a Message. The message hierarchy defines the communication patterns:

The base type of all data exchanged between actors. Every value sent to or received from an actor must be a Message. The message hierarchy defines the communication patterns:

  1. Call — triggers stack coroutine execution in the receiving actor a. Notice — fire-and-forget, no reply expected b. Ask[R] — request-response, expects a Reply of type R
  2. Reply — the response to an Ask

Attributes

Supertypes
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait Call
trait Ask[R]
class Bind
trait Connect
class HttpRequest[C, R]
trait Command[R]
class Auth
class Del
class Get
class HGetAll
class HSet
class Info
class Select
class Set
class ExecuteCursor[R]
trait PrepareQuery[T]
trait SimpleQuery[T]
trait Notice
class Args
class ArrayNotice[T]
class IntNotice
class SeqNotice[T]
class StringNotice
class ProbeStart
trait LogMsg
class Debug
class Error
class Fatal
class Info
class Trace
class Warn
class CursorEnd
class CursorRow[R]
trait Reply
trait UnitReply
trait TimeoutReply
class HttpResponse[C]
class OK
class BulkReply
class OK
trait RedisMap[K, V]
class Success
class Cursor
class ModifyRows
trait Row
class RowSet[R]
Show all
trait Notice extends Call

A Call that does not expect a reply. The sender has no way to know when (or whether) the notice was processed.

A Call that does not expect a reply. The sender has no way to know when (or whether) the notice was processed.

Example:

case class LogEntry(text: String) extends Notice

Attributes

Supertypes
trait Call
trait Message
trait Serializable
class Object
trait Matchable
class Any
Show all
Known subtypes
class Args
trait Connect
class ArrayNotice[T]
class IntNotice
class SeqNotice[T]
class StringNotice
class ProbeStart
trait LogMsg
class Debug
class Error
class Fatal
class Info
class Trace
class Warn
class CursorEnd
class CursorRow[R]
Show all
case class OpenReply(channel: Channel, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
sealed abstract class ReactorEvent extends Event

Attributes

Supertypes
class Event
class Object
trait Matchable
class Any
Known subtypes
case class ReadBuffer(channel: Channel, buffer: RecyclablePageBuffer, sender: Option[SocketAddress] = ..., recipient: SocketAddress, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class ReadCompletedEvent(channel: Channel, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class ReadEvent(channel: Channel, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class RegisterReply(channel: Channel, active: Boolean = ..., cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
trait Reply extends Message

The response to an Ask. Each Reply completes exactly one pending ask, waking the suspended cc.otavia.core.stack.Stack in the sending actor.

The response to an Ask. Each Reply completes exactly one pending ask, waking the suspended cc.otavia.core.stack.Stack in the sending actor.

Attributes

Supertypes
trait Message
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
trait UnitReply
trait TimeoutReply
class HttpResponse[C]
class OK
class BulkReply
class OK
trait RedisMap[K, V]
class Success
class Cursor
class ModifyRows
trait Row
class RowSet[R]
Show all
case class ResourceTimeoutEvent(registerId: Long, resourceTimer: ResourceTimer) extends TimerEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class TimerEvent
class Event
class Object
trait Matchable
class Any
Show all
case class ShutdownReply(channel: Channel, direction: ChannelShutdownDirection, cause: Option[Throwable] = ...) extends ReactorEvent

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class ReactorEvent
class Event
class Object
trait Matchable
class Any
Show all
case class TimeoutEvent(registerId: Long, attach: Option[AnyRef] = ...) extends TimerEvent

Timeout event

Timeout event

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class TimerEvent
class Event
class Object
trait Matchable
class Any
Show all
sealed trait TimeoutReply extends Reply

A Reply indicating that an Ask timed out before the target actor responded.

A Reply indicating that an Ask timed out before the target actor responded.

Attributes

Companion
object
Supertypes
trait Reply
trait Message
trait Serializable
class Object
trait Matchable
class Any
Show all
object TimeoutReply

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class TimerEvent extends Event

Attributes

Supertypes
class Event
class Object
trait Matchable
class Any
Known subtypes

Types

type ReplyOf[A <: Ask[_ <: Reply]] = A match { case Ask[r] => r }

Match type that extracts the Reply type parameter from an Ask. Given GetUser extends Ask[User], ReplyOf[GetUser] resolves to User.

Match type that extracts the Reply type parameter from an Ask. Given GetUser extends Ask[User], ReplyOf[GetUser] resolves to User.

Attributes