* @throws IOException
*/
void commit(KahaTransactionStore transactionStore) throws IOException{
for(int i=0;i<list.size();i++){
TxCommand command=(TxCommand) list.get(i);
MessageStore ms=transactionStore.getStoreById(command.getMessageStoreKey());
if(command.isAdd()){
ms.addMessage(null,(Message) command.getCommand());
}
}
for(int i=0;i<list.size();i++){
TxCommand command=(TxCommand) list.get(i);
MessageStore ms=transactionStore.getStoreById(command.getMessageStoreKey());
if(command.isRemove()){
ms.removeMessage(null,(MessageAck) command.getCommand());
}
}
}