Package io.micronaut.jms.pool
Class MessageProducerPool
java.lang.Object
io.micronaut.jms.pool.AbstractPool<PooledObject<javax.jms.MessageProducer>>
io.micronaut.jms.pool.MessageProducerPool
Pool for ensuring maximum reuse of
MessageProducer
s.- 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
ConstructorDescriptionMessageProducerPool
(int initialSize, int maxSize, javax.jms.Session session) -
Method Summary
Modifier and TypeMethodDescriptionprotected PooledObject<javax.jms.MessageProducer>
Create an object for the pool.protected void
reset
(PooledObject<javax.jms.MessageProducer> 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
-
MessageProducerPool
public MessageProducerPool(int initialSize, int maxSize, javax.jms.Session session)
-
-
Method Details
-
toString
-
create
Description copied from class:AbstractPool
Create an object for the pool.- Specified by:
create
in classAbstractPool<PooledObject<javax.jms.MessageProducer>>
- 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.MessageProducer>>
- Parameters:
pooledObject
- the object
-