Commit 6be5487f authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove some overriden methods in storage base handler because they do not have

to be implemented in each sub handler, especially in the operation handler.
Calls to those methods in a wrong handler will directely fallback to the neo
base handler.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@738 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c6c9b9a6
......@@ -191,33 +191,15 @@ class StorageEventHandler(EventHandler):
def handleAskPartitionTable(self, conn, packet, offset_list):
raise NotImplementedError('this method must be overridden')
def handleSendPartitionTable(self, conn, packet, ptid, row_list):
raise NotImplementedError('this method must be overridden')
def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list):
raise NotImplementedError('this method must be overridden')
def handleStartOperation(self, conn, packet):
raise NotImplementedError('this method must be overridden')
def handleStopOperation(self, conn, packet):
raise NotImplementedError('this method must be overridden')
def handleAskUnfinishedTransactions(self, conn, packet):
raise NotImplementedError('this method must be overridden')
def handleAskTransactionInformation(self, conn, packet, tid):
raise NotImplementedError('this method must be overridden')
def handleAskObjectPresent(self, conn, packet, oid, tid):
raise NotImplementedError('this method must be overridden')
def handleDeleteTransaction(self, conn, packet, tid):
raise NotImplementedError('this method must be overridden')
def handleCommitTransaction(self, conn, packet, tid):
raise NotImplementedError('this method must be overridden')
def handleLockInformation(self, conn, packet, tid):
raise NotImplementedError('this method must be overridden')
......@@ -245,10 +227,6 @@ class StorageEventHandler(EventHandler):
logging.info('ignoring abort transaction')
pass
def handleAnswerLastIDs(self, conn, packet, loid, ltid, lptid):
logging.info('ignoring answer last ids')
pass
def handleAnswerUnfinishedTransactions(self, conn, packet, tid_list):
logging.info('ignoring answer unfinished transactions')
pass
......
......@@ -177,15 +177,6 @@ class OperationEventHandler(StorageEventHandler):
known_master_list):
raise UnexpectedPacketError
def handleAskLastIDs(self, conn, packet):
raise UnexpectedPacketError
def handleAskPartitionTable(self, conn, packet, offset_list):
raise UnexpectedPacketError
def handleSendPartitionTable(self, conn, packet, ptid, row_list):
raise UnexpectedPacketError
@decorators.client_connection_required
def handleNotifyPartitionChanges(self, conn, packet, ptid, cell_list):
"""This is very similar to Send Partition Table, except that
......@@ -219,16 +210,10 @@ class OperationEventHandler(StorageEventHandler):
# Then, the database.
app.dm.changePartitionTable(ptid, cell_list)
def handleStartOperation(self, conn, packet):
raise UnexpectedPacketError
@decorators.client_connection_required
def handleStopOperation(self, conn, packet):
raise OperationFailure('operation stopped')
def handleAskUnfinishedTransactions(self, conn, packet):
raise UnexpectedPacketError
def handleAskTransactionInformation(self, conn, packet, tid):
app = self.app
t = app.dm.getTransaction(tid)
......@@ -239,15 +224,6 @@ class OperationEventHandler(StorageEventHandler):
p = protocol.answerTransactionInformation(tid, t[1], t[2], t[3], t[0])
conn.answer(p, packet)
def handleAskObjectPresent(self, conn, packet, oid, tid):
raise UnexpectedPacketError
def handleDeleteTransaction(self, conn, packet, tid):
raise UnexpectedPacketError
def handleCommitTransaction(self, conn, packet, tid):
raise UnexpectedPacketError
@decorators.client_connection_required
def handleLockInformation(self, conn, packet, tid):
app = self.app
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment