1 18 package org.apache.activemq.store.kahadaptor; 19 20 import org.apache.activemq.command.BaseCommand; 21 import org.apache.activemq.command.CommandTypes; 22 23 24 29 class TxCommand { 30 protected Object messageStoreKey; 31 protected BaseCommand command; 32 33 36 public Object getMessageStoreKey(){ 37 return messageStoreKey; 38 } 39 40 43 public void setMessageStoreKey(Object messageStoreKey){ 44 this.messageStoreKey=messageStoreKey; 45 } 46 47 50 public BaseCommand getCommand(){ 51 return command; 52 } 53 54 57 public void setCommand(BaseCommand command){ 58 this.command=command; 59 } 60 61 64 public boolean isAdd(){ 65 return command != null && command.getDataStructureType() != CommandTypes.MESSAGE_ACK; 66 } 67 68 71 public boolean isRemove(){ 72 return command != null && command.getDataStructureType() == CommandTypes.MESSAGE_ACK; 73 } 74 75 76 77 } 78 | Popular Tags |