001 /**
002 *
003 * Copyright 2004 Hiram Chirino
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 *
017 **/
018 package org.activemq.store.journal;
019
020 /**
021 */
022 public class TxCommand {
023 public static final byte XA_PREPARE=1;
024 public static final byte XA_COMMIT=2;
025 public static final byte XA_ROLLBACK=3;
026 public static final byte LOCAL_COMMIT=4;
027 public static final byte LOCAL_ROLLBACK=5;
028
029 public byte type;
030 public boolean wasPrepared;
031 public Object transactionId;
032
033 public TxCommand(byte type, Object transactionId, boolean wasPrepared) {
034 this.type = type;
035 this.transactionId = transactionId;
036 this.wasPrepared=wasPrepared;
037 }
038 public TxCommand() {
039 }
040
041 public Object getTransactionId() {
042 return transactionId;
043 }
044
045 public void setTransactionId(Object transactionId) {
046 this.transactionId = transactionId;
047 }
048
049 public byte getType() {
050 return type;
051 }
052 public void setType(byte type) {
053 this.type = type;
054 }
055
056 public boolean getWasPrepared() {
057 return wasPrepared;
058 }
059 public void setWasPrepared(boolean wasPrepared) {
060 this.wasPrepared = wasPrepared;
061 }
062 }