object StateMachine
- Alphabetic
- By Inheritance
- StateMachine
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait Action[+R <: Response] extends AnyRef
Represents all the possible side effects that can occur when transitioning to a new state.
- case class Complete[R <: Response](ready: ReadyForQuery, response: Option[Try[R]]) extends TransitionResult[Nothing, R] with Product with Serializable
Indicates that the state machine is finished and the connection may be released.
Indicates that the state machine is finished and the connection may be released. Postgres uses the ReadyForQuery message to indicate this to the client, so it is expected to be provided here. Also, if completing the sate machine should also complete the client's response, then the value to produce can be provided in the
response
field. If the client's promise has already been fulfilled, this will have no effect.- ready
the ReadyForQuery message from the backend confirming the connection's state.
- response
an optional value to used to fulfill the client's promise. If this is None, then the Respond action must have been produced during the state machine's lifecycle to guarantee the client receives a response.
- case class Respond[R <: Response](value: Try[R]) extends Action[R] with Product with Serializable
Respond to the client's request.
Respond to the client's request. This effectively completes the client's request, but will not release the connection yet.
- value
the value used to fulfill the client's response promise.
- final case class Send[M <: FrontendMessage](msg: M) extends Action[Nothing] with Product with Serializable
Send the specified FrontendMessage after transitioning to the new sate.
- final case class SendSeveral(msgs: FrontendMessage*) extends Action[Nothing] with Product with Serializable
Send multiple messages to the backend after transitioning to the new sate.
Send multiple messages to the backend after transitioning to the new sate. This allows sending multiple messages in a row without waiting for a message from the backend between each of them.
- case class Transition[S, R <: Response](state: S, action: Action[R]) extends TransitionResult[S, R] with Product with Serializable
- sealed trait TransitionResult[+S, +R <: Response] extends AnyRef
The result of applying a message to a particular state.
The result of applying a message to a particular state. This encapsulates the new state to transition to as well as possible side effects to produce.
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
- 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 singleMachine[M <: FrontendMessage, R <: Response](name: String, msg: M)(f: (ReadyForQuery) => R)(implicit arg0: MessageEncoder[M]): StateMachine[R]
A machine that sends a single frontend message and expects a ReadyForQuery response
- val syncMachine: StateMachine[Ready.type]
- 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()
- case object NoOp extends Action[Nothing] with Product with Serializable