예제 #1
0
 def askBeginTransaction(self, conn, tid):
     """
         A client request a TID, nothing is kept about it until the finish.
     """
     app = self.app
     node = app.nm.getByUUID(conn.getUUID())
     conn.answer(Packets.AnswerBeginTransaction(app.tm.begin(node, tid)))
예제 #2
0
파일: client.py 프로젝트: sshyran/neoppod
 def askBeginTransaction(self, conn, tid):
     """
         A client request a TID, nothing is kept about it until the finish.
     """
     app = self.app
     # Delay new transaction as long as we are waiting for NotifyReady
     # answers, otherwise we can't know if the client is expected to commit
     # the transaction in full to all these storage nodes.
     if app.storage_starting_set:
         raise DelayEvent
     node = app.nm.getByUUID(conn.getUUID())
     tid = app.tm.begin(node, app.storage_readiness, tid)
     conn.answer(Packets.AnswerBeginTransaction(tid))
예제 #3
0
 def _makeAnswer(self, msg_id):
     packet = Packets.AnswerBeginTransaction(self.getNextTID())
     packet.setId(msg_id)
     return packet