MongoX v0.1.2 Mongo.Pool.Adapter behaviour

The driver supports multiple pooling strategies as long as they implement the following interface.

An adapter should supervise processes of Mongo.Connection and provide the run/2 function to execute an anonymous function with a connection from the pool.

Summary

Callbacks

Runs the function with a checked out connection from the pool, after the function returns the pool should reclaim the connection

Starts any connection pooling and supervision

Types

name :: atom

Callbacks

run(name, list)

Specs

run(name, (pid -> return)) :: {queue_time :: integer, return} when return: var

Runs the function with a checked out connection from the pool, after the function returns the pool should reclaim the connection.

start_link(name, arg1)

Specs

Starts any connection pooling and supervision.