OperationQueueSupport

com.outr.arango.queue.OperationQueueSupport

Mix-in to provide operation queueing capabilities for DocumentModel. With this mixed in, you can use implicits to call:

database.collection.op.upsert(docs: _*): IO[Unit]

This will queue up to opFlushSize and then stream the batch in opChunkSize into the database. Very useful when you are needing to do various operations across potentially multiple collections efficiently. Make sure to call flushQueue() when finished to avoid un-pushed operations.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def clearQueue(): IO[Unit]

Clears the operation queues and removes all pending operations.

Clears the operation queues and removes all pending operations.

Attributes

def flushQueue(): IO[Unit]

Fully flushes all pending operation queues.

Fully flushes all pending operation queues.

Attributes

protected def opChunkSize: Int
protected def opFlushSize: Int

Implicits

Implicits

implicit def collectionToOps[D <: Document[LazyRef(...)], M <: DocumentModel[D]](collection: DocumentCollection[D, M]): OperationsQueue[D, M]