Package io.micronaut.jms.pool
Class SessionPool
java.lang.Object
io.micronaut.jms.pool.AbstractPool<PooledObject<javax.jms.Session>>
io.micronaut.jms.pool.SessionPool
Pool for ensuring maximum reuse of
Sessions within an application.- Since:
- 1.0.0
- Author:
- Elliott Pope
- See Also:
-
Field Summary
Fields inherited from class io.micronaut.jms.pool.AbstractPool
initialSize, maxSize, pool -
Constructor Summary
ConstructorsConstructorDescriptionSessionPool(int initialSize, int maxSize, javax.jms.Connection connection, MessageProducerPoolFactory producerPoolFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected PooledObject<javax.jms.Session>Create an object for the pool.protected voidreset(PooledObject<javax.jms.Session> pooledObject) Reset the provided object so it can be returned to the pool for reuse.toString()Methods inherited from class io.micronaut.jms.pool.AbstractPool
release, request
-
Constructor Details
-
SessionPool
public SessionPool(int initialSize, int maxSize, javax.jms.Connection connection, MessageProducerPoolFactory producerPoolFactory)
-
-
Method Details
-
toString
-
create
Description copied from class:AbstractPoolCreate an object for the pool.- Specified by:
createin classAbstractPool<PooledObject<javax.jms.Session>>- Parameters:
args- the arguments to be provided to the create method.- Returns:
- a new object of type
<T>for the pool.
-
reset
Description copied from class:AbstractPoolReset the provided object so it can be returned to the pool for reuse.- Specified by:
resetin classAbstractPool<PooledObject<javax.jms.Session>>- Parameters:
pooledObject- the object
-