const classafMongo::ConnectionManagerPooled

sys::Obj
  afMongo::ConnectionManagerPooled : afMongo::ConnectionManager

Manages a pool of connections.

Connections are created on-demand and kept in a pool when idle.

Note this connection manager is safe for multi-threaded / web-application use.

make

Source

new make(ActorPool actorPool, |->Connection connectionFactory, |This? f := null)

The maximum time a thread may wait for a connection to become available.

makeWithIpAddr

Source

new makeWithIpAddr(ActorPool actorPool, IpAddr ipAddr := IpAddr)IpAddr.<ctor>("127.0.0.1", Int port := 27017, SocketOptions? options := null, |This? f := null)

maxNoOfConnections

Source

const Int maxNoOfConnections := 10

The maximum number of database connections this pool should open. Set it to the number of concurrent users you expect to use your application.