summaryrefslogtreecommitdiff
path: root/java/broker/main/java/org/apache/qpid/server/txn/TransactionalContext.java
blob: 1ec216cc8b1084d52f773c4e6a9b2c6e16aed7d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * User: Robert Greig
 * Date: 01-Nov-2006
 ******************************************************************************
 * (c) Copyright JP Morgan Chase Ltd 2006. All rights reserved. No part of
 * this program may be photocopied reproduced or translated to another
 * program language without prior written consent of JP Morgan Chase Ltd
 ******************************************************************************/
package org.apache.qpid.server.txn;

import org.apache.qpid.AMQException;
import org.apache.qpid.server.ack.UnacknowledgedMessageMap;
import org.apache.qpid.server.queue.AMQMessage;
import org.apache.qpid.server.queue.AMQQueue;

/**
 * @author Robert Greig (robert.j.greig@jpmorgan.com)
 */
public interface TransactionalContext
{
    void beginTranIfNecessary() throws AMQException;

    void commit() throws AMQException;

    void rollback() throws AMQException;

    void deliver(AMQMessage message, AMQQueue queue) throws AMQException;

    void acknowledgeMessage(long deliveryTag, long lastDeliveryTag, boolean multiple,
                            UnacknowledgedMessageMap unacknowledgedMessageMap) throws AMQException;

    void messageFullyReceived(boolean persistent) throws AMQException;
}