public class RabbitResourceHolder
extends org.springframework.transaction.support.ResourceHolderSupport
Note: This is an SPI class, not intended to be used by applications.
RabbitTransactionManager
,
RabbitTemplate
Constructor and Description |
---|
RabbitResourceHolder()
Create a new RabbitResourceHolder that is open for resources to be added.
|
RabbitResourceHolder(com.rabbitmq.client.Channel channel,
boolean releaseAfterCompletion) |
Modifier and Type | Method and Description |
---|---|
void |
addChannel(com.rabbitmq.client.Channel channel) |
void |
addChannel(com.rabbitmq.client.Channel channel,
Connection connection) |
void |
addConnection(Connection connection) |
void |
addDeliveryTag(com.rabbitmq.client.Channel channel,
long deliveryTag) |
void |
closeAll() |
void |
commitAll() |
boolean |
containsChannel(com.rabbitmq.client.Channel channel) |
com.rabbitmq.client.Channel |
getChannel() |
Connection |
getConnection() |
Connection |
getConnection(Class<? extends Connection> connectionType) |
boolean |
isChannelTransactional() |
boolean |
isFrozen() |
boolean |
isReleaseAfterCompletion()
Whether the resources should be released after transaction completion.
|
void |
rollbackAll() |
clear, getDeadline, getTimeToLiveInMillis, getTimeToLiveInSeconds, hasTimeout, isOpen, isRollbackOnly, isSynchronizedWithTransaction, isVoid, released, requested, reset, setRollbackOnly, setSynchronizedWithTransaction, setTimeoutInMillis, setTimeoutInSeconds, unbound
public RabbitResourceHolder()
public RabbitResourceHolder(com.rabbitmq.client.Channel channel, boolean releaseAfterCompletion)
channel
- a channel to addreleaseAfterCompletion
- true if the channel should be released after completion.public final boolean isFrozen()
public boolean isReleaseAfterCompletion()
public final void addConnection(Connection connection)
public final void addChannel(com.rabbitmq.client.Channel channel)
public final void addChannel(com.rabbitmq.client.Channel channel, Connection connection)
public boolean containsChannel(com.rabbitmq.client.Channel channel)
public Connection getConnection()
public Connection getConnection(Class<? extends Connection> connectionType)
public com.rabbitmq.client.Channel getChannel()
public void commitAll() throws AmqpException
AmqpException
public void closeAll()
public void addDeliveryTag(com.rabbitmq.client.Channel channel, long deliveryTag)
public void rollbackAll()
public boolean isChannelTransactional()