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