Class | Mongo::Pool |
In: |
lib/mongo/util/pool.rb
|
Parent: | Object |
PING_ATTEMPTS | = | 6 |
MAX_PING_TIME | = | 1_000_000 |
PRUNE_INTERVAL | = | 10_000 |
address | [RW] | |
checked_out | [RW] | |
client | [RW] | |
host | [RW] | |
node | [RW] | |
port | [RW] | |
size | [RW] | |
timeout | [RW] |
If a user calls DB#authenticate, and several sockets exist, then we need a way to apply the authentication on each socket. So we store the apply_authentication method, and this will be applied right before the next use of each socket.
Check out an existing socket or create a new socket if the maximum pool size has not been exceeded. Otherwise, wait for the next available socket.
Close this pool.
@option opts [Boolean]:soft (false) If true,
close only those sockets that are not checked out.