trait Topic[A] extends AnyRef
Represents topic, that asynchronously exchanges messages between one or more publisher(s) and one or more subscriber(s).
Guarantees:
- Order of messages from publisher is guaranteed to be preserved to all subscribers
- Messages from publishers may interleave in non deterministic order before they are read by subscribers
- Once the subscriber is run it will receive all messages from all publishers starting with very first message
arrived AFTER the subscriber was run
Please note that topic is active even when there are no publishers or subscribers attached to it. However
once the close or fail is called all the publishers and subscribers will terminate or fail.
Once topic if closed or failed, all new publish or subscribe attempts will fail with reason that was used to close or fail the topic.
- Source
- Topic.scala
- Alphabetic
- By Inheritance
- Topic
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
publish: Sink[Task, A]
Gets publisher to this topic.
Gets publisher to this topic. There may be multiple publishers to this topic.
-
abstract
def
publishOne(a: A): Task[Unit]
publishes single
Ato this topic. -
abstract
def
subscribe: Process[Task, A]
Gets subscriber from this topic.
Gets subscriber from this topic. There may be multiple subscribers to this topic. Subscriber subscribes and un-subscribes when it is run or terminated.
Concrete 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): (Topic[A], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close: Task[Unit]
Will
closethis topic.Will
closethis topic. Onceclosedall publishers and subscribers are halted viaEnd. When this topic isclosedorfailedthis is no-opThe resulting task is completed _after_ all publishers and subscribers are signalled with
End - def ensuring(cond: (Topic[A]) ⇒ Boolean, msg: ⇒ Any): Topic[A]
- def ensuring(cond: (Topic[A]) ⇒ Boolean): Topic[A]
- def ensuring(cond: Boolean, msg: ⇒ Any): Topic[A]
- def ensuring(cond: Boolean): Topic[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail(rsn: Throwable): Task[Unit]
Will
failthis topic.Will
failthis topic. Oncefailedall publishers and subscribers will terminate with causeerr. When this topic isfinishedorfailedthis is no-opThe resulting task is completed _after_ all publishers and subscribers are signalled with
err -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
kill: Task[Unit]
Causes this topic to be closed and all subscribers to this topic to be killed immediately.
Causes this topic to be closed and all subscribers to this topic to be killed immediately.
he resulting task is completed _after_ all publishers and subscribers are signalled with
Kill -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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( ... )
- def →[B](y: B): (Topic[A], B)