blob: 2a3b524060f8ba001a6b16f391912934e5792d38 (
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
34
35
36
37
38
39
40
41
42
43
44
45
|
/**
* 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.store.MessageStore;
/**
* A transactional operation to store messages in an underlying persistent store. When this operation
* commits it will do everything to ensure that all messages are safely committed to persistent
* storage.
*/
public class StoreMessageOperation implements TxnOp
{
private final MessageStore _messsageStore;
public StoreMessageOperation(MessageStore messageStore)
{
_messsageStore = messageStore;
}
public void prepare() throws AMQException
{
}
public void undoPrepare()
{
}
public void commit() throws AMQException
{
_messsageStore.commitTran();
}
public void rollback() throws AMQException
{
_messsageStore.abortTran();
}
}
|