// Path: rahub-cross-cutting-concerns/src/main/java/net/jotorren/microservices/tx/CompositeTransactionManager.java
// public interface CompositeTransactionManager {
// 
// 	void open(String txId);
// 	void enlist(String txId, EntityCommand<?> ec);
// 	List<EntityCommand<?>> fetch(String txId);
// 	void close(String txId);
// }
// 
// Path: rahub-cross-cutting-concerns/src/main/java/net/jotorren/microservices/tx/EntityCommand.java
// public class EntityCommand<T> implements Serializable{
// 	private static final long serialVersionUID = -3927305961526601453L;
// 
// 	public enum Action {
// 		INSERT, UPDATE, DELETE, QUERY
// 	}
// 
// 	private T entity;
// 	private Action action;
// 	private String transactionId;
// 	private long timestamp;
// 	
// 	public T getEntity() {
// 		return entity;
// 	}
// 
// 	public void setEntity(T entity) {
// 		this.entity = entity;
// 	}
// 
// 	public Action getAction() {
// 		return action;
// 	}
// 
// 	public void setAction(Action action) {
// 		this.action = action;
// 	}
// 
// 	public String getTransactionId() {
// 		return transactionId;
// 	}
// 
// 	public void setTransactionId(String transactionId) {
// 		this.transactionId = transactionId;
// 	}
// 
// 	public long getTimestamp() {
// 		return timestamp;
// 	}
// 
// 	public void setTimestamp(long timestamp) {
// 		this.timestamp = timestamp;
// 	}
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.jotorren.microservices.tx.CompositeTransactionManager;
import net.jotorren.microservices.tx.EntityCommand;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package net.jotorren.microservices.tx.impl;




public class CompositeTransactionManagerMemoryImpl implements CompositeTransactionManager {

	private static final Logger LOG = LoggerFactory.getLogger(CompositeTransactionManager.class);

// Path: rahub-cross-cutting-concerns/src/main/java/net/jotorren/microservices/tx/CompositeTransactionManager.java
// public interface CompositeTransactionManager {
// 
// 	void open(String txId);
// 	void enlist(String txId, EntityCommand<?> ec);
// 	List<EntityCommand<?>> fetch(String txId);
// 	void close(String txId);
// }
// 
// Path: rahub-cross-cutting-concerns/src/main/java/net/jotorren/microservices/tx/EntityCommand.java
// public class EntityCommand<T> implements Serializable{
// 	private static final long serialVersionUID = -3927305961526601453L;
// 
// 	public enum Action {
// 		INSERT, UPDATE, DELETE, QUERY
// 	}
// 
// 	private T entity;
// 	private Action action;
// 	private String transactionId;
// 	private long timestamp;
// 	
// 	public T getEntity() {
// 		return entity;
// 	}
// 
// 	public void setEntity(T entity) {
// 		this.entity = entity;
// 	}
// 
// 	public Action getAction() {
// 		return action;
// 	}
// 
// 	public void setAction(Action action) {
// 		this.action = action;
// 	}
// 
// 	public String getTransactionId() {
// 		return transactionId;
// 	}
// 
// 	public void setTransactionId(String transactionId) {
// 		this.transactionId = transactionId;
// 	}
// 
// 	public long getTimestamp() {
// 		return timestamp;
// 	}
// 
// 	public void setTimestamp(long timestamp) {
// 		this.timestamp = timestamp;
// 	}
// }


// Path: rahub-cross-cutting-concerns/src/main/java/net/jotorren/microservices/tx/impl/CompositeTransactionManagerMemoryImpl.java
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.jotorren.microservices.tx.CompositeTransactionManager;
import net.jotorren.microservices.tx.EntityCommand;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package net.jotorren.microservices.tx.impl;




public class CompositeTransactionManagerMemoryImpl implements CompositeTransactionManager {

	private static final Logger LOG = LoggerFactory.getLogger(CompositeTransactionManager.class);

	private Map<String, List<EntityCommand<?>>> transactions = new ConcurrentHashMap<String, List<EntityCommand<?>>>();