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.
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 Future failed with cause
.
Failing an already closed stream does not have an effect.
A Future that resolves once this writer is closed and flushed.
A 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.
Write an element
into this stream.
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.
Close the resource.
Close the resource. The returned Future is completed when the resource has been fully relinquished.
Given f, a function from B into A, creates an Writer[B] whose fail
and close
functions
are equivalent to Writer[A]'s.
Given f, a function from B into A, creates an Writer[B] whose fail
and close
functions
are equivalent to Writer[A]'s. Writer[B]'s write
function is equivalent to:
def write(element: B) = Writer[A].write(f(element))
Abstract
Writer
class for Java compatibility.