1 18 package org.apache.activemq.command; 19 20 import org.apache.activemq.util.IntrospectionSupport; 21 22 23 26 public class JournalTransaction implements DataStructure { 27 28 public static final byte DATA_STRUCTURE_TYPE=CommandTypes.JOURNAL_TRANSACTION; 29 30 public static final byte XA_PREPARE=1; 31 public static final byte XA_COMMIT=2; 32 public static final byte XA_ROLLBACK=3; 33 public static final byte LOCAL_COMMIT=4; 34 public static final byte LOCAL_ROLLBACK=5; 35 36 public byte type; 37 public boolean wasPrepared; 38 public TransactionId transactionId; 39 40 public byte getDataStructureType() { 41 return DATA_STRUCTURE_TYPE; 42 } 43 44 public JournalTransaction(byte type, TransactionId transactionId, boolean wasPrepared) { 45 this.type = type; 46 this.transactionId = transactionId; 47 this.wasPrepared=wasPrepared; 48 } 49 50 public JournalTransaction() { 51 } 52 53 56 public TransactionId getTransactionId() { 57 return transactionId; 58 } 59 60 public void setTransactionId(TransactionId transactionId) { 61 this.transactionId = transactionId; 62 } 63 64 67 public byte getType() { 68 return type; 69 } 70 public void setType(byte type) { 71 this.type = type; 72 } 73 74 77 public boolean getWasPrepared() { 78 return wasPrepared; 79 } 80 81 public void setWasPrepared(boolean wasPrepared) { 82 this.wasPrepared = wasPrepared; 83 } 84 85 public boolean isMarshallAware() { 86 return false; 87 } 88 89 public String toString() { 90 return IntrospectionSupport.toString(this, JournalTransaction.class); 91 } 92 } 93 | Popular Tags |