class Aerospike::ConnectionPool
Attributes
cluster[RW]
host[RW]
Public Class Methods
new(cluster, host)
click to toggle source
Calls superclass method
# File lib/aerospike/utils/connection_pool.rb, line 22 def initialize(cluster, host) self.cluster = cluster self.host = host super(cluster.connection_queue_size) end
Public Instance Methods
check(conn)
click to toggle source
# File lib/aerospike/utils/connection_pool.rb, line 37 def check(conn) conn.alive? end
cleanup(conn)
click to toggle source
# File lib/aerospike/utils/connection_pool.rb, line 41 def cleanup(conn) conn.close if conn end
create()
click to toggle source
# File lib/aerospike/utils/connection_pool.rb, line 28 def create conn = nil loop do conn = cluster.create_connection(host) break if conn.connected? end conn end