connection-pool-0.1.0.0: Connection pool built on top of resource-pool and streaming-commons.

Portabilitynon-portable (NoImplicitPrelude, DeriveDataTypeable)
Stabilityunstable (internal module)
Maintainerpeter.trsko@gmail.com
Safe HaskellNone

Data.ConnectionPool.Internal.ResourcePoolParams

Contents

Description

Internal packages are here to provide access to internal definitions for library writers, but they should not be used in application code.

Preferably use qualified import, e.g.:

 import qualified Data.ConnectionPool.Internal.ResourcePoolParams
   as Internal

Surprisingly this module doesn't depend on resource-pool package and it would be good if it stayed that way, but not at the cost of cripling functionality.

Importantly this package should not depend on streaming-commons package or other modules of this package.

Please, bear above in mind when doing modifications.

Synopsis

ResourcePoolParams

data ResourcePoolParams Source

Parameters of resource pool that describe things like its internal structure. See createPool for details.

Instances

Data ResourcePoolParams 
Show ResourcePoolParams 
Typeable ResourcePoolParams 
Default ResourcePoolParams
 numberOfStripes = 1
 resourceIdleTimeout = 0.5
 numberOfResourcesPerStripe = 1

Lenses

numberOfResourcesPerStripe :: Functor f => (Int -> f Int) -> ResourcePoolParams -> f ResourcePoolParamsSource

Lens for accessing maximum number of resources to keep open per stripe. The smallest acceptable value is 1 (default).

numberOfStripes :: Functor f => (Int -> f Int) -> ResourcePoolParams -> f ResourcePoolParamsSource

Lens for accessing stripe count. The number of distinct sub-pools to maintain. The smallest acceptable value is 1 (default).

resourceIdleTimeout :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> ResourcePoolParams -> f ResourcePoolParamsSource

Lens for accessing amount of time for which an unused resource is kept open. The smallest acceptable value is 0.5 seconds (default).