Package akka.stream.impl.io
Class FileSink
- java.lang.Object
-
- akka.stream.impl.SinkModule<ByteString,scala.concurrent.Future<IOResult>>
-
- akka.stream.impl.io.FileSink
-
- All Implemented Interfaces:
Graph<SinkShape<ByteString>,scala.concurrent.Future<IOResult>>
,StreamLayout.AtomicModule<SinkShape<ByteString>,scala.concurrent.Future<IOResult>>
public final class FileSink extends SinkModule<ByteString,scala.concurrent.Future<IOResult>>
INTERNAL API Creates simple synchronous Sink which writes all incoming elements to the given file (creating it before hand if necessary).
-
-
Constructor Summary
Constructors Constructor Description FileSink(java.nio.file.Path f, long startPosition, scala.collection.immutable.Set<java.nio.file.OpenOption> options, Attributes attributes, SinkShape<ByteString> shape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attributes
attributes()
scala.Tuple2<org.reactivestreams.Subscriber<ByteString>,scala.concurrent.Future<IOResult>>
create(MaterializationContext context)
protected java.lang.String
label()
protected SinkModule<ByteString,scala.concurrent.Future<IOResult>>
newInstance(SinkShape<ByteString> shape)
SinkModule<ByteString,scala.concurrent.Future<IOResult>>
withAttributes(Attributes attr)
-
Methods inherited from class akka.stream.impl.SinkModule
amendShape, shape, toString, traversalBuilder
-
-
-
-
Constructor Detail
-
FileSink
public FileSink(java.nio.file.Path f, long startPosition, scala.collection.immutable.Set<java.nio.file.OpenOption> options, Attributes attributes, SinkShape<ByteString> shape)
-
-
Method Detail
-
attributes
public Attributes attributes()
- Specified by:
attributes
in classSinkModule<ByteString,scala.concurrent.Future<IOResult>>
-
create
public scala.Tuple2<org.reactivestreams.Subscriber<ByteString>,scala.concurrent.Future<IOResult>> create(MaterializationContext context)
-
label
protected java.lang.String label()
- Overrides:
label
in classSinkModule<ByteString,scala.concurrent.Future<IOResult>>
-
newInstance
protected SinkModule<ByteString,scala.concurrent.Future<IOResult>> newInstance(SinkShape<ByteString> shape)
- Specified by:
newInstance
in classSinkModule<ByteString,scala.concurrent.Future<IOResult>>
-
withAttributes
public SinkModule<ByteString,scala.concurrent.Future<IOResult>> withAttributes(Attributes attr)
-
-