GridFSStreams

sealed trait GridFSStreams

Akka-stream support for GridFS.

Companion:
object
class Object
trait Matchable
class Any

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.

Type parameters:
Id

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

M

the type of the message digest

Value parameters:
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.

Value parameters:
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.

Value parameters:
file

the file to be read

Inherited methods

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

Abstract fields

val gridfs: GridFS[Pack]