[Neo-report] r2275 vincent - /trunk/neo/pt.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 2 10:28:25 CEST 2010
Author: vincent
Date: Thu Sep 2 10:28:25 2010
New Revision: 2275
Log:
Export a method to compute a partition number from a OID or TID.
Modified:
trunk/neo/pt.py
Modified: trunk/neo/pt.py
==============================================================================
--- trunk/neo/pt.py [iso-8859-1] (original)
+++ trunk/neo/pt.py [iso-8859-1] Thu Sep 2 10:28:25 2010
@@ -136,11 +136,11 @@ class PartitionTable(object):
return []
def getCellListForTID(self, tid, readable=False, writable=False):
- return self.getCellList(self._getPartitionFromIndex(u64(tid)),
+ return self.getCellList(self.getPartitionFromIndex(tid),
readable, writable)
def getCellListForOID(self, oid, readable=False, writable=False):
- return self.getCellList(self._getPartitionFromIndex(u64(oid)),
+ return self.getCellList(self.getPartitionFromIndex(oid),
readable, writable)
def isAssigned(self, oid, uuid):
@@ -150,6 +150,9 @@ class PartitionTable(object):
return True
return False
+ def getPartitionFromIndex(self, index):
+ return self._getPartitionFromIndex(u64(index))
+
def _getPartitionFromIndex(self, index):
return index % self.np
More information about the Neo-report
mailing list