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
Session
s 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
ConstructorDescriptionSessionPool
(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 void
reset
(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:AbstractPool
Create an object for the pool.- Specified by:
create
in 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:AbstractPool
Reset the provided object so it can be returned to the pool for reuse.- Specified by:
reset
in classAbstractPool<PooledObject<javax.jms.Session>>
- Parameters:
pooledObject
- the object
-