| Class | Mongo::Session::SessionPool |
| In: |
lib/mongo/session/session_pool.rb
|
| Parent: | Object |
A pool of server sessions.
@api private
@since 2.5.0
Create a SessionPool.
@example
SessionPool.create(cluster)
@param [ Mongo::Cluster ] cluster The cluster that will be associated with this
session pool.
@since 2.5.0
Initialize a SessionPool.
@example
SessionPool.new(cluster)
@param [ Mongo::Cluster ] cluster The cluster that will be associated with this
session pool.
@since 2.5.0
Checkin a server session to the pool.
@example Checkin a session.
pool.checkin(session)
@param [ Session::ServerSession ] session The session to checkin.
@since 2.5.0
Checkout a server session from the pool.
@example Checkout a session.
pool.checkout
@return [ ServerSession ] The server session.
@since 2.5.0
End all sessions in the pool by sending the endSessions command to the server.
@example End all sessions.
pool.end_sessions
@since 2.5.0