Skip to content

Commit 118ae73

Browse files
authored
Fix docs referencing Mongo::Pool which does not exist (#984)
1 parent 579ba5d commit 118ae73

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

lib/mongo/address.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def inspect
142142
# @param [ Float ] socket_timeout The socket timeout.
143143
# @param [ Hash ] ssl_options SSL options.
144144
#
145-
# @return [ Pool::Socket::SSL, Pool::Socket::TCP, Pool::Socket::Unix ] The socket.
145+
# @return [ Mongo::Socket::SSL, Mongo::Socket::TCP, Mongo::Socket::Unix ] The socket.
146146
#
147147
# @since 2.0.0
148148
def socket(socket_timeout, ssl_options = {})

lib/mongo/address/ipv4.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def initialize(host, port, host_name=nil)
8080
# @param [ Float ] socket_timeout The socket timeout.
8181
# @param [ Hash ] ssl_options SSL options.
8282
#
83-
# @return [ Pool::Socket::SSL, Pool::Socket::TCP ] The socket.
83+
# @return [ Mongo::Socket::SSL, Mongo::Socket::TCP ] The socket.
8484
#
8585
# @since 2.0.0
8686
def socket(socket_timeout, ssl_options = {})

lib/mongo/address/ipv6.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def initialize(host, port, host_name=nil)
9696
# @param [ Float ] socket_timeout The socket timeout.
9797
# @param [ Hash ] ssl_options SSL options.
9898
#
99-
# @return [ Pool::Socket::SSL, Pool::Socket::TCP ] The socket.
99+
# @return [ Mongo::Socket::SSL, Mongo::Socket::TCP ] The socket.
100100
#
101101
# @since 2.0.0
102102
def socket(socket_timeout, ssl_options = {})

lib/mongo/address/unix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def initialize(host, port=nil, host_name=nil)
6565
# @param [ Float ] socket_timeout The socket timeout.
6666
# @param [ Hash ] ssl_options SSL options - ignored.
6767
#
68-
# @return [ Pool::Socket::Unix ] The socket.
68+
# @return [ Mongo::Socket::Unix ] The socket.
6969
#
7070
# @since 2.0.0
7171
def socket(socket_timeout, ssl_options = {})

lib/mongo/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def inspect
201201
# @example Get the connection pool for the server.
202202
# server.pool
203203
#
204-
# @return [ Mongo::Pool ] The connection pool.
204+
# @return [ Mongo::Server::ConnectionPool ] The connection pool.
205205
#
206206
# @since 2.0.0
207207
def pool

lib/mongo/server/connection_pool.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def checkin(connection)
4747
# @example Check a connection out from the pool.
4848
# pool.checkout
4949
#
50-
# @return [ Mongo::Pool::Connection ] The checked out connection.
50+
# @return [ Mongo::Server::Connection ] The checked out connection.
5151
#
5252
# @since 2.0.0
5353
def checkout
@@ -120,14 +120,14 @@ def with_connection
120120

121121
class << self
122122

123-
# Get a connection pool for the provided server.
123+
# Creates a new connection pool for the provided server.
124124
#
125-
# @example Get a connection pool.
126-
# Mongo::Pool.get(server)
125+
# @example Create a new connection pool.
126+
# Mongo::Server::ConnectionPool.get(server)
127127
#
128128
# @param [ Mongo::Server ] server The server.
129129
#
130-
# @return [ Mongo::Pool ] The connection pool.
130+
# @return [ Mongo::Server::ConnectionPool ] The connection pool.
131131
#
132132
# @since 2.0.0
133133
def get(server)

lib/mongo/server/connection_pool/queue.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Queue
5353
# @example Dequeue a connection.
5454
# queue.dequeue
5555
#
56-
# @return [ Mongo::Pool::Connection ] The next connection.
56+
# @return [ Mongo::Server::Connection ] The next connection.
5757
#
5858
# @since 2.0.0
5959
def dequeue
@@ -82,7 +82,7 @@ def disconnect!
8282
# @example Enqueue a connection.
8383
# queue.enqueue(connection)
8484
#
85-
# @param [ Mongo::Pool::Connection ] connection The connection.
85+
# @param [ Mongo::Server::Connection ] connection The connection.
8686
#
8787
# @since 2.0.0
8888
def enqueue(connection)
@@ -96,7 +96,7 @@ def enqueue(connection)
9696
# the initial size of the queue.
9797
#
9898
# @example Create the queue.
99-
# Mongo::Pool::Queue.new(max_pool_size: 5) { Connection.new }
99+
# Mongo::Server::ConnectionPool::Queue.new(max_pool_size: 5) { Connection.new }
100100
#
101101
# @param [ Hash ] options The options.
102102
#
@@ -124,7 +124,7 @@ def initialize(options = {}, &block)
124124
#
125125
# @since 2.0.0
126126
def inspect
127-
"#<Mongo::Pool::Queue:0x#{object_id} min_size=#{min_size} max_size=#{max_size} " +
127+
"#<Mongo::Server::ConnectionPool::Queue:0x#{object_id} min_size=#{min_size} max_size=#{max_size} " +
128128
"wait_timeout=#{wait_timeout} current_size=#{queue.size}>"
129129
end
130130

0 commit comments

Comments
 (0)