trait BufferedMessageSocket[F[_]] extends MessageSocket[F]
A MessageSocket
that buffers incoming messages, removing and handling asynchronous back-end
messages. This splits the protocol into a [logically] synchronous message exchange plus a set of
out-of-band broadcast channels that can be observed or ignored at the user's discretion.
- Alphabetic
- By Inheritance
- BufferedMessageSocket
- MessageSocket
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def backendKeyData: Deferred[F, BackendKeyData]
-
abstract
def
expect[B](f: PartialFunction[BackendMessage, B])(implicit or: Origin): F[B]
- Definition Classes
- MessageSocket
-
abstract
def
flatExpect[B](f: PartialFunction[BackendMessage, F[B]])(implicit or: Origin): F[B]
- Definition Classes
- MessageSocket
-
abstract
def
history(max: Int): F[List[Either[Any, Any]]]
Destructively read the last
n
messages from the circular buffer.Destructively read the last
n
messages from the circular buffer.- Definition Classes
- MessageSocket
-
abstract
def
notifications(maxQueued: Int): Stream[F, Notification[String]]
Stream
of all channel notifications that thisSession
is subscribed to.Stream
of all channel notifications that thisSession
is subscribed to. Note that once such a stream is started it is important to consume all notifications as quickly as possible to avoid blocking message processing for other operations on theSession
(although typically a dedicatedSession
will receive channel notifications so this won't be an issue).- maxQueued
the maximum number of notifications to hold in a queue before [semantically] blocking message exchange on the controlling
Session
.
- See also
-
abstract
def
parameters: Signal[F, Map[String, String]]
Signal representing the current state of all Postgres configuration variables announced to this session.
Signal representing the current state of all Postgres configuration variables announced to this session. These are sent after authentication and are updated asynchronously if the runtime environment changes. The current keys are as follows (with example values), but these may change with future releases so you should be prepared to handle unexpected ones.
Map( "application_name" -> "", "client_encoding" -> "UTF8", "DateStyle" -> "ISO, MDY", "integer_datetimes" -> "on", // cannot change after startup "IntervalStyle" -> "postgres", "is_superuser" -> "on", "server_encoding" -> "UTF8", // cannot change after startup "server_version" -> "9.5.3", // cannot change after startup "session_authorization" -> "postgres", "standard_conforming_strings" -> "on", "TimeZone" -> "US/Pacific", )
-
abstract
def
receive: F[BackendMessage]
Receive the next
BackendMessage
, or raise an exception if EOF is reached before a complete message arrives.Receive the next
BackendMessage
, or raise an exception if EOF is reached before a complete message arrives.- Definition Classes
- MessageSocket
-
abstract
def
send(message: FrontendMessage): F[Unit]
Send the specified message.
Send the specified message.
- Definition Classes
- MessageSocket
-
abstract
def
terminate: F[Unit]
- Attributes
- protected
-
abstract
def
transactionStatus: Signal[F, TransactionStatus]
Signal
broadcasting the currentTransactionStatus
which is reported after each completed message exchange.Signal
broadcasting the currentTransactionStatus
which is reported after each completed message exchange. Note that this value may be stale in the case of a raised exception, which should prompt the front end to send aSync
message but currently does not.
Concrete 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( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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()
-
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( ... )
-
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()