class Neo4j::ConnectionPool
- Neo4j::ConnectionPool
- Reference
- Object
Defined in:
neo4j/connection_pool.crConstructors
Instance Method Summary
- #checkout(& : Bolt::Connection -> T) : T forall T
- #checkout : Bolt::Connection
-
#checkout_some(candidates : Enumerable(WeakRef(Bolt::Connection))) : Tuple(Bolt::Connection, Bool)
selected, is_candidate = pool.checkout_some(candidates)
selected
be a resource from thecandidates
list andis_candidate
==true
orselected
will be a new resource andis_candidate
==false
-
#close : Nil
close all resources in the pool
- #release(resource : Bolt::Connection) : Nil
-
#stats
Returns stats of the pool
Instance methods inherited from class Object
to_bolt_params : Neo4j::Value
to_bolt_params
Constructor Detail
def self.new(initial_pool_size : Int32 = 0, max_pool_size : Int32 = 0, max_idle_pool_size : Int32 = 1, checkout_timeout : Time::Span = 5.seconds, retry_attempts : Int32 = 1, retry_delay : Time::Span = 200.milliseconds, &factory : -> Bolt::Connection)
#
Instance Method Detail
def checkout_some(candidates : Enumerable(WeakRef(Bolt::Connection))) : Tuple(Bolt::Connection, Bool)
#
selected, is_candidate = pool.checkout_some(candidates)
selected
be a resource from the candidates
list and is_candidate
== true
or selected
will be a new resource and is_candidate
== false