Class: CommonPool::PoolDataSource

Inherits:
Object
  • Object
show all
Defined in:
lib/common_pool.rb

Overview

Data source for objects to be stored in the pool.

Instance Method Summary collapse

Instance Method Details

#create_objectObject

Override to create an object to be stored in the pool.

Raises:



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.

Returns:

  • (Boolean)


101
102
103
# File 'lib/common_pool.rb', line 101

def valid?(object)
  true
end