ProcessQueue

com.outr.arango.queue.ProcessQueue
case class ProcessQueue[T](process: List[T] => IO[Unit], flushSize: Int, chunkSize: Int)

ProcessQueue provides a convenience capability to batch process in chunks.

Value parameters

chunkSize

the max number of records per chunk sent to the process function

flushSize

the number of records before a flush occurs

process

the function to process a chunk of the queue

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def apply(docs: T*): IO[Unit]

Queue operations for the supplied docs. If this causes the flushSize to overflow, a flush will occur before this returns. Otherwise, this is a very fast operation.

Queue operations for the supplied docs. If this causes the flushSize to overflow, a flush will occur before this returns. Otherwise, this is a very fast operation.

Attributes

def flush(fullFlush: Boolean): IO[Unit]

Flushes the queue

Flushes the queue

Value parameters

fullFlush

if true, all operations are applied. If false, flushing only occurs until the operation count is below the flushSize threshold.

Attributes

def processed: Int

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product