GridFSStreams

reactivemongo.akkastream.GridFSStreams
See theGridFSStreams companion object
sealed trait GridFSStreams

Akka-stream support for GridFS.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

final def sink[Id <: Value, M](file: FileToSave[Id], digestInit: => M, digestUpdate: (M, Array[Byte]) => M, digestFinalize: M => Future[Option[Array[Byte]]], chunkSize: Int)(implicit ec: ExecutionContext): Sink[ByteString, Future[ReadFile[Id]]]

Returns an Sink that will consume data to put into a GridFS store.

Returns an Sink that will consume data to put into a GridFS store.

Attributes

Id

the type of the id of this file (generally BSONObjectID or BSONValue)

M

the type of the message digest

chunkSize

the size (in byte) of the chunks

digestFinalize

the function to finalize the digest

digestInit

the factory for the message digest

digestUpdate

the function to update the digest

file

the metadata of the file to store.

final def sinkWithMD5[Id <: Value](file: FileToSave[Id], chunkSize: Int)(implicit ec: ExecutionContext): Sink[ByteString, Future[ReadFile[Id]]]

Returns an Sink that will consume data to put into a GridFS store.

Returns an Sink that will consume data to put into a GridFS store.

Attributes

chunkSize

the size (in byte) of the chunks (default: 255kB)

file

the metadata of the file to store.

final def source[Id <: Value](file: ReadFile[Id], readPreference: ReadPreference)(implicit m: Materializer): Source[ByteString, Future[State]]

Produces an enumerator of chunks of bytes from the chunks collection matching the given file metadata.

Produces an enumerator of chunks of bytes from the chunks collection matching the given file metadata.

Attributes

file

the file to be read

Inherited methods

protected def concat[T](a1: Array[T], a2: Array[T])(implicit m: ClassTag[T]): Array[T]

Attributes

Inherited from:
GridFSCompat (hidden)

Abstract fields

val gridfs: GridFS[Pack]