/* Returns the value of the PadInt when the transaction * has the read/write lock. * Throw an exception if PadInt not found. */ internal override int ReadPadInt(int tid, int uid) { Logger.Log(new String[] { "FreezedServer", Server.ID.ToString(), "readPadInt ", "tid", tid.ToString(), "uid", uid.ToString() }); int result; lock (this) { while (!recover) { Monitor.Wait(this); } result = oldState.ReadPadInt(tid, uid); Monitor.Pulse(this); } return(result); }
/* Returns the value of the PadInt when the transaction * has the read/write lock. * Throw an exception if PadInt not found. */ public int ReadPadInt(int tid, int uid) { Logger.Log(new String[] { "Server", ID.ToString(), "readPadInt ", "tid", tid.ToString(), "uid", uid.ToString(), serverState.StateMsg }); try { return(serverState.ReadPadInt(tid, uid)); } catch (PadIntNotFoundException) { throw; } catch (AbortException) { throw; } catch (ServerDoesNotReplyException) { throw; } }