class SpoolSource[A] extends AnyRef
A SpoolSource is a simple object for creating and populating a Spool-chain. apply() returns a Future[Spool] that is populated by calls to offer(). This class is thread-safe.
- Alphabetic
- By Inheritance
- SpoolSource
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SpoolSource()
- new SpoolSource(interruptHandler: PartialFunction[Throwable, Unit])
- interruptHandler
attached to every Promise in the produced Spool.
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
- def apply(): Future[Spool[A]]
Gets the current outstanding Future for the next Spool value.
Gets the current outstanding Future for the next Spool value. The returned Spool will see all future values passed to offer(), up until close() is called. Previous values passed to offer() will not be seen in the Spool.
- 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 close(): Unit
Closes this SpoolSource, which also terminates the generated Spool.
Closes this SpoolSource, which also terminates the generated Spool. This method is idempotent.
- val closed: Future[Unit]
Fulfilled when this SpoolSource has been closed or an exception is raised.
- 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()
- final def offer(value: A): Unit
Puts a value into the spool.
Puts a value into the spool. Unless this SpoolSource has been closed, the current Future[Spool[A]] value will be fulfilled with a Spool that contains the provided value. If the SpoolSource has been closed, then this value is ignored. If multiple threads call
offer
simultaneously, the operation is thread-safe but the resulting order of values in the spool is non-deterministic. - final def offerAndClose(value: A): Unit
Puts a value into the spool and closes this SpoolSource.
Puts a value into the spool and closes this SpoolSource. Unless this SpoolSource has been closed, the current Future[Spool[A]] value will be fulfilled with
value *:: Future.value(Spool.empty[A])
. If the SpoolSource has been closed, then this value is ignored. If multiple threads call offer simultaneously, the operation is thread-safe but the resulting order of values in the spool is non-deterministic. - final def raise(e: Throwable): Unit
Raises exception on this SpoolSource, which also terminates the generated Spool.
Raises exception on this SpoolSource, which also terminates the generated Spool. This method is idempotent.
- 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()