}
throw new TransactionException("Failed to commit the transaction in the defined retries.");
}
public void add(Integer value, Context __transactionContext__){
try{
DirectoryManager locator = HyFlow.getLocator();
Node head = (Node)locator.open(HEAD);
String oldNext = head.getNext(__transactionContext__);
String newNodeId = Network.getInstance().getID() + "-" + Math.random(); // generate random id
System.out.println(newNodeId);
Node newNode = new Node(newNodeId, value);
newNode.setNext(oldNext, __transactionContext__);