public bool commit(int txID, List <string> participants) { if (Datastore.STATE.Equals(State.FAILED)) { return(false); } bool success = Datastore.Commit(txID, participants); return(success); }
public bool accessPadInt(int uid) { if (Datastore.STATE.Equals(State.FAILED)) { return(false); } bool success = Datastore.checkServerObject(uid); return(success); }
public bool createPadInt(int uid, int txID, string clientURL) { if (Datastore.STATE.Equals(State.FAILED)) { return(false); } while (Datastore.STATE.Equals(State.FREEZE)) { Datastore.Freeze(); } bool success = Datastore.createServerObject(uid, txID, clientURL); return(success); }
public int Read(int uid, int txID, string clientURL) { while (Datastore.STATE.Equals(State.FREEZE)) { Console.WriteLine("SERVER FREEZED!"); Datastore.Freeze(); } if (Datastore.STATE.Equals(State.FAILED)) { return(Int32.MinValue); } int val = Datastore.regTentativeRead(uid, txID, clientURL); return(val); }
public void Write(int uid, int txID, int newVal, string clientURL) { if (Datastore.STATE.Equals(State.FAILED)) { throw new ServerFailedException(); } bool success = Datastore.regTentativeWrite(uid, newVal, txID, clientURL); if (!success) { Console.WriteLine("ABORTED TRANSACTION=" + txID); IEndTransaction client = (IEndTransaction)Activator.GetObject( typeof(IEndTransaction), clientURL + "EndTransaction"); client.abort(); } return; }
public void haveCommitted(int txID, string url) { Datastore.haveCommitted(txID, url); }
public void sendNo(int txID, string url) { Datastore.participantVoteYes(txID, url); }
public void doAbort(int txID, string coordURL) { Datastore.doAbort(txID, coordURL); }
public void canCommit(int txID, string coordURL) { Datastore.canCommit(txID, coordURL); }