Portability | non-portable (NoImplicitPrelude, DeriveDataTypeable) |
---|---|

Stability | unstable (internal module) |

Maintainer | peter.trsko@gmail.com |

Safe Haskell | None |

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.

- data ResourcePoolParams = ResourcePoolParams {}
- numberOfResourcesPerStripe :: Functor f => (Int -> f Int) -> ResourcePoolParams -> f ResourcePoolParams
- numberOfStripes :: Functor f => (Int -> f Int) -> ResourcePoolParams -> f ResourcePoolParams
- resourceIdleTimeout :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> ResourcePoolParams -> f ResourcePoolParams

# ResourcePoolParams

data ResourcePoolParams Source

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

for details.

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).