Class: CommonPool::PoolDataSource
- Inherits:
-
Object
- Object
- CommonPool::PoolDataSource
- Defined in:
- lib/common_pool.rb
Overview
Data source for objects to be stored in the pool.
Instance Method Summary collapse
-
#create_object ⇒ Object
Override to create an object to be stored in the pool.
-
#valid?(object) ⇒ Boolean
Override to check the validity of your idle object, called when idle object eviction stread.
Instance Method Details
#create_object ⇒ Object
Override to create an object to be stored in the pool.
96 97 98 |
# File 'lib/common_pool.rb', line 96 def create_object raise CommonPoolError, "Overwrite this method to create an object to be stored in the pool." end |
#valid?(object) ⇒ Boolean
Override to check the validity of your idle object, called when idle object eviction stread.
101 102 103 |
# File 'lib/common_pool.rb', line 101 def valid?(object) true end |