//Requests a unique transaction timestamp to the master. private void requestTransID() { _master = (RemoteMasterInterface)Activator.GetObject( typeof(RemoteMasterInterface), "tcp://localhost:" + Interfaces.Constants.MasterPort + "/master"); //request to the master a Transaction ID _master.getTimeStamp(); }
//Creates a transaction and generates a timestamp. public Transaction begin() { checkStatus(); _master = (RemoteMasterInterface)Activator.GetObject( typeof(RemoteMasterInterface), "tcp://localhost:" + Interfaces.Constants.MasterPort + "/master"); try { DateTime dt = _master.getTimeStamp(); return( new Transaction(dt, null)); } catch(TxException e) { Console.WriteLine(e.Message); throw e; } }