abstract class AbstractWriter[-A] extends Writer[A]
Abstract Writer
class for Java compatibility.
- Alphabetic
- By Inheritance
- AbstractWriter
- Writer
- Closable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AbstractWriter()
Abstract Value Members
- abstract def close(deadline: Time): Future[Unit]
Close the resource with the given deadline.
Close the resource with the given deadline. This deadline is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
- Definition Classes
- Closable
- abstract def fail(cause: Throwable): Unit
Fail this stream with a given
cause
.Fail this stream with a given
cause
. No further writes are allowed, but if happen, will resolve into a com.twitter.util.Future failed withcause
.- Definition Classes
- Writer
- Note
Failing an already closed stream does not have an effect.
- abstract def onClose: Future[StreamTermination]
A com.twitter.util.Future that resolves once this writer is closed and flushed.
A com.twitter.util.Future that resolves once this writer is closed and flushed.
It may contain an error if the writer is failed.
This is useful for any extra resource cleanup that you must do once the stream is no longer being used.
- Definition Classes
- Writer
- abstract def write(element: A): Future[Unit]
Write an
element
into this stream.Write an
element
into this stream. Although undefined by this contract, a trustworthy implementation (such as Pipe) would do its best to resolve the returned com.twitter.util.Future only when a consumer observes a writtenelement
.The write can also resolve into a failure (failed com.twitter.util.Future).
- Definition Classes
- Writer
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(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(after: Duration): Future[Unit]
Close the resource with the given timeout.
Close the resource with the given timeout. This timeout is advisory, giving the callee some leeway, for example to drain clients or finish up other tasks.
- Definition Classes
- Closable
- final def close(): Future[Unit]
Close the resource.
Close the resource. The returned Future is completed when the resource has been fully relinquished.
- Definition Classes
- Closable
- final def contramap[B](f: (B) => A): Writer[B]
Given f, a function from B into A, creates an Writer[B] whose
fail
andclose
functions are equivalent to Writer[A]'s.Given f, a function from B into A, creates an Writer[B] whose
fail
andclose
functions are equivalent to Writer[A]'s. Writer[B]'swrite
function is equivalent to:def write(element: B) = Writer[A].write(f(element))
- Definition Classes
- Writer
- 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 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()